|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The MessageBroker enables an application to send messages, requests and replies to other apps.
| Method Summary | |
void |
addMessageListener(AppToken app,
MessageListener listener)
Add a listener that wishes to receive message notifications. |
void |
removeMessageListener(AppToken app,
MessageListener listener)
Remove an entity from the list of those interested in messages notifications. |
ResponseMarker |
sendAsyncRequest(AppToken app,
PeerMessage request,
int timeout)
Sends an asynchronous request to an app, informing the registered MessageListener when the response is received or the timeout has been exceeded. |
SendMarker |
sendMessage(AppToken app,
PeerMessage message)
Sends a message asynchronously, returning a SendMarker for tracking the progress of the message transmission. |
PeerMessage |
sendRequest(AppToken app,
PeerMessage request,
int timeout)
Sends a request to an app, waiting until the response is received or until the timeout is exceeded. |
SendMarker |
sendResponse(PeerMessage request,
PeerMessage message)
Sends an asynchronous reply to an app's request, informing the registered MessageListener when the send has completed. |
| Method Detail |
public PeerMessage sendRequest(AppToken app,
PeerMessage request,
int timeout)
throws java.io.IOException
app - Description of Parameterrequest - Description of Parametertimeout - Description of Parameter
public SendMarker sendMessage(AppToken app,
PeerMessage message)
throws java.io.IOException
app - Description of Parametermessage - Description of Parameter
public ResponseMarker sendAsyncRequest(AppToken app,
PeerMessage request,
int timeout)
throws java.io.IOException
app - Description of Parameterrequest - Description of Parametertimeout - Description of Parameter
public SendMarker sendResponse(PeerMessage request,
PeerMessage message)
throws java.io.IOException
request - Description of Parametermessage - Description of Parameter
public void addMessageListener(AppToken app,
MessageListener listener)
app - the app that this entity represents; message destinationlistener - entity to add
public void removeMessageListener(AppToken app,
MessageListener listener)
app - the app that this entity represents; message destinationlistener - entity to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||