net.tomp2p.rpc
Interface RawDataReply


public interface RawDataReply


Method Summary
 org.jboss.netty.buffer.ChannelBuffer reply(PeerAddress sender, org.jboss.netty.buffer.ChannelBuffer requestBuffer)
          Replies to a direct message from a peer.
 

Method Detail

reply

org.jboss.netty.buffer.ChannelBuffer reply(PeerAddress sender,
                                           org.jboss.netty.buffer.ChannelBuffer requestBuffer)
                                           throws Exception
Replies to a direct message from a peer. This reply is based on ChannelBuffer, which is typically used for those cases where a custom encoder/decoder is necessary.

Parameters:
sender - The sender to from which the request came
requestBuffer - The incoming buffer
Returns:
A ChannelBuffer with the result. If null is returned, then the message will contain NOT_FOUND, if the same buffer as requestBuffer is sent back, the message will contain OK, otherwise the payload will be set.
Throws:
Exception - In case of an exception, a stacktrack will be printed to System.err and a log output will be generated


Copyright © 2013. All Rights Reserved.