Package org.eclipse.net4j.util.om.trace
Class RemoteTraceServer
- java.lang.Object
-
- org.eclipse.net4j.util.om.trace.RemoteTraceServer
-
public class RemoteTraceServer extends java.lang.ObjectA server thatagentscan connect to and that passes the receivedtrace eventstoregisteredlisteners.- Author:
- Eike Stepper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteTraceServer.Eventstatic interfaceRemoteTraceServer.ListenerListens totrace eventsbeing passed by a remote traceserver.static classRemoteTraceServer.PrintListener
-
Field Summary
Fields Modifier and Type Field Description static intANY_PORTstatic java.lang.StringDEFAULT_ADDRESSstatic intDEFAULT_PORT
-
Constructor Summary
Constructors Constructor Description RemoteTraceServer()RemoteTraceServer(int port)RemoteTraceServer(int port, java.lang.String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(RemoteTraceServer.Listener listener)protected java.net.ServerSocketbind()java.lang.Exceptionclose()protected voidfireEvent(RemoteTraceServer.Event event)protected voidhandleConnections()protected voidhandleSession(java.net.Socket socket)protected voidhandleTrace(java.io.DataInputStream in)voidremoveListener(RemoteTraceServer.Listener listener)voidstart()
-
-
-
Field Detail
-
DEFAULT_ADDRESS
public static final java.lang.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 java.io.IOException- Throws:
java.io.IOException
-
RemoteTraceServer
public RemoteTraceServer(int port) throws java.io.IOException- Throws:
java.io.IOException
-
RemoteTraceServer
public RemoteTraceServer(int port, java.lang.String address) throws java.io.IOException- Throws:
java.io.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 java.lang.Exception close()
-
bind
protected java.net.ServerSocket bind() throws java.io.IOException- Throws:
java.io.IOException
-
handleConnections
protected void handleConnections()
-
handleSession
protected void handleSession(java.net.Socket socket)
-
handleTrace
protected void handleTrace(java.io.DataInputStream in) throws java.io.IOException- Throws:
java.io.IOException
-
fireEvent
protected void fireEvent(RemoteTraceServer.Event event)
-
-