|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.media.mn8.protocol.jabber.JabberDataBlockDispatcher
The dispatcher for blocks that have arrived. Adds new blocks to the dispatch queue, and then dispatches waiting blocks in their own thread to avoid holding up the stream reader.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
JabberDataBlockDispatcher()
Constructor to start the dispatcher in a thread. |
Method Summary | |
void |
broadcastBeginConversation()
Method to tell the listener the stream is ready for talking to. |
void |
broadcastJabberDataBlock(JabberDataBlock dataBlock)
Method to add a datablock to the dispatch queue |
void |
broadcastTerminatedConnection(Exception exception)
Method to tell the listener the connection has been terminated |
void |
halt()
Method to stop the dispatcher |
void |
run()
The thread loop that handles dispatching any waiting datablocks |
void |
setJabberListener(JabberListener _listener)
Set the listener that we are dispatching to. |
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 |
Constructor Detail |
public JabberDataBlockDispatcher()
Method Detail |
public void setJabberListener(JabberListener _listener)
_listener
- The listener to dispatch to.public void broadcastJabberDataBlock(JabberDataBlock dataBlock)
public void run()
run
in interface Runnable
run
in class Thread
public void halt()
public void broadcastTerminatedConnection(Exception exception)
exception
- The exception that caused the termination. This may be
null for the situtations where the connection has terminated without an
exception.public void broadcastBeginConversation()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |