|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Msg
- type of message to sendRec
- type of Record a message is converted to before being sentL
- type of Listener the MessageSender will acceptpublic interface MessageSender<Msg,Rec,L extends org.robokind.api.common.utils.Listener<Msg>>
High-Level Message sender. Uses an Adapter to convert Messages to Records. Uses a RecordSender to send the Records. Notifies Listeners of Messages sent.
Method Summary | |
---|---|
void |
addMessageListener(L listener)
Adds a Listener to be notified when a Message has been sent. |
void |
removeMessageListener(L listener)
Removes a Listener from being notified. |
void |
sendMessage(Msg message)
Sends the given Message. |
void |
setAdapter(org.robokind.api.common.utils.Adapter<Msg,Rec> adapter)
Sets the Adapter used to convert Messages to Records. |
void |
setRecordSender(RecordSender<Rec> sender)
Sets the RecordSender responsible for sending Records. |
void |
start()
Initializes and connects the MessageSender, making it ready to send Messages. |
void |
stop()
Stops the MessageSender, making it unable to send Messages. |
Method Detail |
---|
void setRecordSender(RecordSender<Rec> sender)
sender
- the RecordSender to setvoid setAdapter(org.robokind.api.common.utils.Adapter<Msg,Rec> adapter)
adapter
- the Adapter to setvoid start() throws Exception
Exception
- if there is an error startingvoid stop()
void sendMessage(Msg message)
message
- the Message to sendvoid 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 |