public class DirectDataRPC extends DispatchHandler
| Constructor and Description |
|---|
DirectDataRPC(PeerBean peerBean,
ConnectionBean connectionBean) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder)
If the message is OK, that has been previously checked by the user using checkMessage, a reply to the message is
generated here.
|
boolean |
hasObjectDataReply() |
boolean |
hasRawDataReply() |
void |
objectDataReply(ObjectDataReply objectDataReply) |
void |
rawDataReply(RawDataReply rawDataReply) |
FutureResponse |
send(PeerAddress remotePeer,
SendDirectBuilderI sendDirectBuilder,
ChannelCreator channelCreator) |
RequestHandler<FutureResponse> |
sendInternal(PeerAddress remotePeer,
SendDirectBuilderI sendDirectBuilder)
Send data directly to a peer.
|
connectionBean, createMessage, createResponseMessage, createResponseMessage, forwardMessage, peerBean, register, register, signpublic DirectDataRPC(PeerBean peerBean, ConnectionBean connectionBean)
public RequestHandler<FutureResponse> sendInternal(PeerAddress remotePeer, SendDirectBuilderI sendDirectBuilder)
remotePeer - The remote peer to store the databuffer - The data to send to the remote peerraw - Set to true if a the byte array is expected or if it should be converted to an objectchannelCreator - The channel creatoridleTCPMillis - Set the timeout when a connection is considered inactive (idle)forceUDP - Set to true if the communication should be UDP, default is TCPpublic FutureResponse send(PeerAddress remotePeer, SendDirectBuilderI sendDirectBuilder, ChannelCreator channelCreator)
public void rawDataReply(RawDataReply rawDataReply)
public void objectDataReply(ObjectDataReply objectDataReply)
public boolean hasRawDataReply()
public boolean hasObjectDataReply()
public void handleResponse(Message message, PeerConnection peerConnection, boolean sign, Responder responder) throws Exception
DispatchHandlerhandleResponse in class DispatchHandlermessage - Request messagesign - Flag to indicate if message is signedException - Any exceptionCopyright © 2014. All rights reserved.