|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Msg
- type of Message receivedRec
- type of Record receivedL
- type of Listener notified of new Messagespublic interface MessageReceiver<Msg,Rec,L extends org.robokind.api.common.utils.Listener<Msg>>
High-Level Message Receiver. Contains a RecordReceiver for receiving Records. Contains an Adapter for converting Records back to Messages. Notifies Listeners of Messages Received.
Method Summary | |
---|---|
void |
addMessageListener(L listener)
Adds a Listener to be notified when a Message has been received. |
void |
pause()
Pauses a MessageReceiver. |
void |
removeMessageListener(L listener)
Removes a Listener from being notified. |
void |
resume()
Resumes a paused MessageReceiver. |
void |
setAdapter(org.robokind.api.common.utils.Adapter<Rec,Msg> adapter)
Sets the Adapter used to convert Records to Messages. |
void |
setRecordReceiver(RecordReceiver<Rec> service)
Sets the RecordReceiver used to receive Records. |
void |
start()
Initializes and connects the MessageReceiver, and begins receiving Messages. |
void |
stop()
Stops the MessageReceiver, making it unable to receive Messages. |
Method Detail |
---|
void setRecordReceiver(RecordReceiver<Rec> service)
service
- theRecordReceiver to setvoid setAdapter(org.robokind.api.common.utils.Adapter<Rec,Msg> adapter)
adapter
- the Adapter to setvoid start() throws Exception
Exception
- if there is an error startingvoid pause()
void resume()
void stop()
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 |