|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MessageBlockingReceiver<Msg,Rec,L extends Listener<Msg>>
| Method Summary | |
|---|---|
void |
addMessageListener(L 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(L listener)
Removes a Listener from being notified. |
void |
setAdapter(Adapter<Rec,Msg> adapter)
Sets the Adapter used to convert Records to Messages. |
void |
setRecordReceiver(RecordBlockingReceiver<Rec> service)
Sets the RecordAsyncReceiver used to receive Records. |
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 setRecordReceiver(RecordBlockingReceiver<Rec> service)
service - theRecordReceiver to setvoid setAdapter(Adapter<Rec,Msg> adapter)
adapter - the Adapter to set
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(L listener)
listener - the Listener to be notifiedvoid removeMessageListener(L listener)
listener - the Listener to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||