ix.util
Class IPC.ObjectStreamServer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--ix.util.IPC.ObjectStreamServer
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
IPC

public static class IPC.ObjectStreamServer
extends java.lang.Thread

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 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
protected  void receiveFrom(IPC.ObjectStreamConnection connection)
           
protected  void registerWithNameServer()
           
 void run()
           
protected  boolean shouldWaitForNameServer()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

strategy

IPC.ObjectStreamCommunicationStrategy strategy

destination

java.lang.Object destination

listener

IPC.MessageListener listener

addr

IPC.ServiceAddress addr

servSock

java.net.ServerSocket servSock
Constructor Detail

IPC.ObjectStreamServer

public IPC.ObjectStreamServer(IPC.ObjectStreamCommunicationStrategy strategy,
                              java.lang.Object destination,
                              IPC.MessageListener listener)
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

registerWithNameServer

protected void registerWithNameServer()

shouldWaitForNameServer

protected boolean shouldWaitForNameServer()

receiveFrom

protected void receiveFrom(IPC.ObjectStreamConnection connection)