org.eclipse.net4j.util.om.trace
Class RemoteTraceServer

java.lang.Object
  extended by org.eclipse.net4j.util.om.trace.RemoteTraceServer

public class RemoteTraceServer
extends Object

A server that agents can connect to and that passes the received trace events to registered listeners.


Nested Class Summary
static class RemoteTraceServer.Event
          A trace event being passed by a remote trace server to registered listeners.
static interface RemoteTraceServer.Listener
          Listens to trace events being passed by a remote trace server.
static class RemoteTraceServer.PrintListener
          A listener that appends trace events to a print stream.
 
Field Summary
static int ANY_PORT
           
static String DEFAULT_ADDRESS
           
static int DEFAULT_PORT
           
 
Constructor Summary
RemoteTraceServer()
           
RemoteTraceServer(int port)
           
RemoteTraceServer(int port, String address)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ADDRESS

public static final String DEFAULT_ADDRESS
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

ANY_PORT

public static final int ANY_PORT
See Also:
Constant Field Values
Constructor Detail

RemoteTraceServer

public RemoteTraceServer()
                  throws IOException
Throws:
IOException

RemoteTraceServer

public RemoteTraceServer(int port)
                  throws IOException
Throws:
IOException

RemoteTraceServer

public RemoteTraceServer(int port,
                         String address)
                  throws IOException
Throws:
IOException
Method Detail

start

public void start()
Since:
3.0

addListener

public void addListener(RemoteTraceServer.Listener listener)

removeListener

public void removeListener(RemoteTraceServer.Listener listener)

close

public Exception close()

bind

protected ServerSocket bind()
                     throws IOException
Throws:
IOException

handleConnections

protected void handleConnections()

handleSession

protected void handleSession(Socket socket)

handleTrace

protected void handleTrace(DataInputStream in)
                    throws IOException
Throws:
IOException

fireEvent

protected void fireEvent(RemoteTraceServer.Event event)


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.