|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The PBMessenger is responsible for transmitting messages (generic, requests, replies) from the peer network.
| Method Summary | |
void |
addMessageObserver(PBMessageObserver observer)
Add a receiver that wishes to receive message notifications. |
PBMessage |
createMessage()
Creates a new peer message instance to be sent. |
void |
removeMessageObserver(PBMessageObserver observer)
Remove an entity from the list of those interested in messages notifications. |
PBResponseMarker |
sendAsyncRequest(PBApplication app,
PBMessage request,
int timeout)
Transmits a message over the peer network to the target peer |
PBSendMarker |
sendMessage(PBApplication app,
PBMessage message)
Transmits a message over the peer network to the target app |
PBMessage |
sendRequest(PBApplication app,
PBMessage request,
int timeout)
Transmits a request over the peer network to the target app |
PBSendMarker |
sendResponse(PBMessage request,
PBMessage response)
Transmits a response over the peer network to the target peer |
| Method Detail |
public PBMessage createMessage()
public PBSendMarker sendMessage(PBApplication app,
PBMessage message)
throws java.io.IOException
app - app to receive messagemessage - message to send
public PBMessage sendRequest(PBApplication app,
PBMessage request,
int timeout)
throws java.io.IOException
app - app to receive messagerequest - request to sendtimeout - how long to wait for a response (in sec)
public PBResponseMarker sendAsyncRequest(PBApplication app,
PBMessage request,
int timeout)
throws java.io.IOException
app - app to receive messagerequest - request to sendtimeout - how long to wait for a response (in sec)
public PBSendMarker sendResponse(PBMessage request,
PBMessage response)
throws java.io.IOException
request - request which was receivedresponse - response to send backpublic void addMessageObserver(PBMessageObserver observer)
receiver - entity to addpublic void removeMessageObserver(PBMessageObserver observer)
reciever - entity to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||