|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread biz.chitec.quarterback.gjsa.DefaultFreeFloatingHandler
Handler for free floating server messages. Handles "out of order" (free-floating or "pushed") messages from the server. Manages several channels on which receivers can connect.
This handler can be attached to a SessionConnector from the outside. This attachment can be repeated as often as required without any loss of the internal state.
This handler operates as a stand-alone Thread of itself (as the asynchronous nature of the free floating events suggests). The thread must be started from outside also alone.
Field Summary | |
protected java.util.Map |
receivers
Storage for all registered receivers |
protected ThreadInterface |
ti
Communication interface with the SessionConnector |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
DefaultFreeFloatingHandler()
Default constructor. |
Method Summary | |
void |
addFreeFloatingReceiver(int[] messages,
FreeFloatingReceiver ffr)
Add one receiver simultaneously to several message types. |
void |
addFreeFloatingReceiver(int message,
FreeFloatingReceiver ffr)
Add one receiver to a specific message type. |
void |
attachToServerConnector(ServerConnector sc)
Attaches this handler to a SessionConnector. |
ThreadInterface |
getProducerInterface()
Returns the producer interface of this handler. |
protected void |
handleFreeFloatingMessage(int message,
java.lang.Object data)
Handle a free floating message. |
void |
removeFreeFloatingReceiver(FreeFloatingReceiver ffr)
Remove a receiver from all messages it has been registered to. |
void |
removeFreeFloatingReceiver(int[] messages,
FreeFloatingReceiver ffr)
Remove a receiver from several message types at once. |
void |
removeFreeFloatingReceiver(int message,
FreeFloatingReceiver ffr)
Remove a receiver from one specific message type. |
void |
run()
The main loop. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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 |
protected ThreadInterface ti
protected java.util.Map receivers
Constructor Detail |
public DefaultFreeFloatingHandler()
Method Detail |
public ThreadInterface getProducerInterface()
public void attachToServerConnector(ServerConnector sc)
public void addFreeFloatingReceiver(int message, FreeFloatingReceiver ffr)
Note that this method locks access to the internal receivers storage. Take care on deadlock situations!
public void addFreeFloatingReceiver(int[] messages, FreeFloatingReceiver ffr)
public void removeFreeFloatingReceiver(int message, FreeFloatingReceiver ffr)
public void removeFreeFloatingReceiver(int[] messages, FreeFloatingReceiver ffr)
public void removeFreeFloatingReceiver(FreeFloatingReceiver ffr)
protected void handleFreeFloatingMessage(int message, java.lang.Object data)
Note that this method locks access to the internal receivers storage. Take care on deadlock situations!
public void run()
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |