|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteneter.messaging.dataprocessing.messagequeueing.WorkingThread<TMessage>
TMessage
- type of the message processed by the threadpublic class WorkingThread<TMessage>
Thread with the message queue. If a message is put to the queue, the thread removes it from the queue and calls a call-back method to process it.
Constructor Summary | |
---|---|
WorkingThread()
|
Method Summary | |
---|---|
void |
enqueueMessage(TMessage message)
Puts the message to the queue. |
void |
registerMessageHandler(IMethod1<TMessage> messageHandler)
Registers the method handling messages from the queue and starts the thread reading messages from the queue. |
void |
unregisterMessageHandler()
Unregisters the method handling messages from the queue and stops the thread reading messages. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkingThread()
Method Detail |
---|
public void registerMessageHandler(IMethod1<TMessage> messageHandler)
messageHandler
- Callback called from the working thread to process the messagepublic void unregisterMessageHandler()
public void enqueueMessage(TMessage message) throws java.lang.Exception
message
- message
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |