|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Msg
- type of message to sendpublic interface MessageSender<Msg>
High-level message sender for sending API objects. A typical MessageSender will serialize the Message to a Record and send it using a low-level RecordSender. Notifies Listeners of Messages sent.
Method Summary | |
---|---|
void |
addListener(org.jflux.api.core.Listener<Msg> listener)
Adds a Listener to be notified when a Message has been sent. |
void |
notifyListeners(Msg message)
Sends the given Message. |
void |
removeListener(org.jflux.api.core.Listener<Msg> listener)
Removes a Listener from being notified. |
void |
start()
Initializes and connects the MessageSender, making it ready to send Messages. |
void |
stop()
Stops the MessageSender, making it unable to send Messages. |
Methods inherited from interface org.jflux.api.core.Listener |
---|
handleEvent |
Method Detail |
---|
void start() throws Exception
Exception
- if there is an error startingvoid stop()
void notifyListeners(Msg message)
notifyListeners
in interface org.jflux.api.core.Notifier<Msg>
message
- the Message to sendvoid addListener(org.jflux.api.core.Listener<Msg> listener)
addListener
in interface org.jflux.api.core.Notifier<Msg>
listener
- the Listener to be notifiedvoid removeListener(org.jflux.api.core.Listener<Msg> listener)
removeListener
in interface org.jflux.api.core.Notifier<Msg>
listener
- the Listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |