|
||||||||||
| 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.
| Field Summary | |
|---|---|
static int |
DEFAULT_TIMEOUT_LENGTH
|
| Method Summary | |
|---|---|
void |
addMessageListener(org.jflux.api.core.Listener<Msg> listener)
Adds a Listener to be notified when a Message has been received. |
int |
clearMessages()
Removes any pending messages for this receiver. |
long |
getTimeout()
|
Msg |
getValue()
Blocks while waiting for a Message. |
void |
removeMessageListener(org.jflux.api.core.Listener<Msg> listener)
Removes a Listener from being notified. |
void |
setTimeout(long timeout)
|
void |
start()
Initializes and connects the MessageAsyncReceiver, and begins receiving Messages. |
void |
stop()
Stops the MessageAsyncReceiver, making it unable to receive Messages. |
| Field Detail |
|---|
static final int DEFAULT_TIMEOUT_LENGTH
| Method Detail |
|---|
void start()
throws Exception
Exception - if there is an error startingvoid stop()
Msg getValue()
getValue in interface org.jflux.api.core.Source<Msg>void setTimeout(long timeout)
long getTimeout()
int clearMessages()
void addMessageListener(org.jflux.api.core.Listener<Msg> listener)
listener - the Listener to be notifiedvoid removeMessageListener(org.jflux.api.core.Listener<Msg> listener)
listener - the Listener to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||