|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--ix.util.CatchingThread | +--ix.util.IPC.ObjectStreamServer
A Thread that accepts connections to a ServerSocket and creates an object-reading thread for each connection. Each of the object-reading threads notifies the specified listener when an object is received. The listener's messageReceived method should presumably therefore be synchronized.
Field Summary | |
(package private) IPC.ServiceAddress |
addr
|
(package private) java.lang.Object |
destination
|
(package private) IPC.MessageListener |
listener
|
(package private) java.net.ServerSocket |
servSock
|
(package private) IPC.ObjectStreamCommunicationStrategy |
strategy
|
Fields inherited from class ix.util.CatchingThread |
innerRunnable |
Fields inherited from class java.lang.Thread |
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals |
Constructor Summary | |
IPC.ObjectStreamServer(IPC.ObjectStreamCommunicationStrategy strategy,
java.lang.Object destination,
IPC.MessageListener listener)
|
Method Summary | |
void |
innerRun()
Calls the run() method of the innerRunnable passed to the constructor, if innerRunnable is non-null, otherwise does nothing. |
protected void |
receiveFrom(IPC.ObjectStreamConnection connection)
|
protected void |
receiveLoop(IPC.ObjectStreamConnection connection)
|
protected void |
registerWithNameServer()
|
protected boolean |
shouldWaitForNameServer()
|
Methods inherited from class ix.util.CatchingThread |
handleException, reportException, run |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
IPC.ObjectStreamCommunicationStrategy strategy
java.lang.Object destination
IPC.MessageListener listener
IPC.ServiceAddress addr
java.net.ServerSocket servSock
Constructor Detail |
public IPC.ObjectStreamServer(IPC.ObjectStreamCommunicationStrategy strategy, java.lang.Object destination, IPC.MessageListener listener)
Method Detail |
public void innerRun()
CatchingThread
innerRun
in class CatchingThread
protected void registerWithNameServer()
protected boolean shouldWaitForNameServer()
protected void receiveFrom(IPC.ObjectStreamConnection connection)
protected void receiveLoop(IPC.ObjectStreamConnection connection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |