|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Msg - type of Message to returnpublic interface MessageBlockingReceiver<Msg>
Synchronous message receiver. Uses a RecordBlockingReceiver to wait for a Record. Uses an Adapter to adapt Records to Messages.
| Method Summary | |
|---|---|
void |
addMessageListener(Listener<Msg> listener)
Adds a Listener to be notified when a Message has been received. |
int |
clearMessages()
Removes any pending messages for this receiver. |
Msg |
fetchMessage(long timeout)
Blocks while waiting for a Message. |
void |
removeMessageListener(Listener<Msg> listener)
Removes a Listener from being notified. |
void |
start()
Initializes and connects the MessageAsyncReceiver, and begins receiving Messages. |
void |
stop()
Stops the MessageAsyncReceiver, making it unable to receive Messages. |
| Method Detail |
|---|
void start()
throws Exception
Exception - if there is an error startingvoid stop()
Msg fetchMessage(long timeout)
timeout - timeout length in milliseconds
int clearMessages()
void addMessageListener(Listener<Msg> listener)
listener - the Listener to be notifiedvoid removeMessageListener(Listener<Msg> listener)
listener - the Listener to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||