public class RemoteTraceServer extends Object
agents
can connect to and that passes the received trace events
to registered
listeners
.Modifier and Type | Class and Description |
---|---|
static class |
RemoteTraceServer.Event
|
static interface |
RemoteTraceServer.Listener
Listens to
trace events being passed by a remote trace server . |
static class |
RemoteTraceServer.PrintListener
|
Modifier and Type | Field and Description |
---|---|
static int |
ANY_PORT |
static String |
DEFAULT_ADDRESS |
static int |
DEFAULT_PORT |
Constructor and Description |
---|
RemoteTraceServer() |
RemoteTraceServer(int port) |
RemoteTraceServer(int port,
String address) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(RemoteTraceServer.Listener listener) |
protected ServerSocket |
bind() |
Exception |
close() |
protected void |
fireEvent(RemoteTraceServer.Event event) |
protected void |
handleConnections() |
protected void |
handleSession(Socket socket) |
protected void |
handleTrace(DataInputStream in) |
void |
removeListener(RemoteTraceServer.Listener listener) |
void |
start() |
public static final String DEFAULT_ADDRESS
public static final int DEFAULT_PORT
public static final int ANY_PORT
public RemoteTraceServer() throws IOException
IOException
public RemoteTraceServer(int port) throws IOException
IOException
public RemoteTraceServer(int port, String address) throws IOException
IOException
public void start()
public void addListener(RemoteTraceServer.Listener listener)
public void removeListener(RemoteTraceServer.Listener listener)
public Exception close()
protected ServerSocket bind() throws IOException
IOException
protected void handleConnections()
protected void handleSession(Socket socket)
protected void handleTrace(DataInputStream in) throws IOException
IOException
protected void fireEvent(RemoteTraceServer.Event event)
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.