| Package | Description |
|---|---|
| net.tomp2p.connection | |
| net.tomp2p.futures | |
| net.tomp2p.message | |
| net.tomp2p.p2p | |
| net.tomp2p.rpc |
| Modifier and Type | Method and Description |
|---|---|
protected void |
RequestHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Message responseMessage) |
protected void |
Dispatcher.channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Message message) |
DispatchHandler |
Dispatcher.getAssociatedHandler(Message message)
Checks if we have a handler for the given message.
|
void |
Responder.response(Message responseMessage) |
void |
Dispatcher.DirectResponder.response(Message responseMessage) |
void |
Sender.sendTCP(io.netty.channel.SimpleChannelInboundHandler<Message> handler,
FutureResponse futureResponse,
Message message,
ChannelCreator channelCreator,
int idleTCPSeconds,
int connectTimeoutMillis,
PeerConnection peerConnection)
Send a message via TCP.
|
void |
Sender.sendUDP(io.netty.channel.SimpleChannelInboundHandler<Message> handler,
FutureResponse futureResponse,
Message message,
ChannelCreator channelCreator,
int idleUDPSeconds,
boolean broadcast)
Send a message via UDP.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Sender.sendTCP(io.netty.channel.SimpleChannelInboundHandler<Message> handler,
FutureResponse futureResponse,
Message message,
ChannelCreator channelCreator,
int idleTCPSeconds,
int connectTimeoutMillis,
PeerConnection peerConnection)
Send a message via TCP.
|
void |
Sender.sendUDP(io.netty.channel.SimpleChannelInboundHandler<Message> handler,
FutureResponse futureResponse,
Message message,
ChannelCreator channelCreator,
int idleUDPSeconds,
boolean broadcast)
Send a message via UDP.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
FutureResponse.getRequest()
The future response always keeps a reference to the request.
|
Message |
FutureResponse.getResponse()
Returns the response message.
|
| Modifier and Type | Method and Description |
|---|---|
BaseFuture.FutureType |
FutureSuccessEvaluatorCommunication.evaluate(Message requestMessage,
Message responseMessage) |
BaseFuture.FutureType |
FutureSuccessEvaluatorOperation.evaluate(Message requestMessage,
Message responseMessage) |
BaseFuture.FutureType |
FutureSuccessEvaluator.evaluate(Message requestMessage,
Message responseMessage)
Evaluates if a request is a success.
|
void |
ProgressListener.progress(Message interMediateMessage) |
void |
FutureResponse.progress(Message interMediateMessage)
This will be called by the TomP2P library when a partial message is ready.
|
FutureResponse |
FutureResponse.setResponse(Message responseMessage)
Gets called if a peer responds.
|
boolean |
FutureResponse.setResponseLater(Message responseMessage) |
| Constructor and Description |
|---|
FutureResponse(Message requestMessage)
Create the future and set the request message.
|
FutureResponse(Message requestMessage,
FutureSuccessEvaluator futureSuccessEvaluator)
Create the future and set the request message.
|
FutureResponse(Message requestMessage,
FutureSuccessEvaluator futureSuccessEvaluator,
ProgressListener progressListener)
Create the future and set the request message.
|
FutureResponse(Message requestMessage,
ProgressListener progressListener)
Create the future and set the request message.
|
| Modifier and Type | Method and Description |
|---|---|
static Message |
MessageHeaderCodec.decodeHeader(io.netty.buffer.ByteBuf buffer,
InetSocketAddress recipient,
InetSocketAddress sender)
Decode a message header from a Netty buffer.
|
Message |
Message.done(boolean done) |
Message |
Message.hasContent(boolean content) |
Message |
Decoder.message() |
Message |
Encoder.message() |
Message |
Decoder.prepareFinish() |
Message |
Message.presetContentTypes(boolean presetContentTypes)
If we are setting values from the decoder, then the content type is already set.
|
Message |
Message.receivedSignature(SignatureCodec signatureEncode) |
Message |
Message.recipientSocket(InetSocketAddress recipientSocket)
Store the recipient of the packet.
|
Message |
Message.senderSocket(InetSocketAddress senderSocket)
Store the sender of the packet.
|
Message |
Message.setBloomFilter(SimpleBloomFilter<Number160> bloomFilter) |
Message |
Message.setBuffer(Buffer byteBuf) |
Message |
Message.setCommand(byte command)
Command of the message, such as GET, PING, etc.
|
Message |
Message.setContentType(int index,
Message.Content contentType)
Sets or replaces the content type at a specific index.
|
Message |
Message.setContentType(Message.Content contentType)
Convenient method to set content type.
|
Message |
Message.setContentTypes(Message.Content[] contentTypes)
Used for deserialization.
|
Message |
Message.setDataMap(DataMap dataMap) |
Message |
Message.setDone()
Set done to true if message decoding or encoding is done.
|
Message |
Message.setHintSign()
Set if we have a signed message.
|
Message |
Message.setInteger(int integer) |
Message |
Message.setKeepAlive(boolean isKeepAlive) |
Message |
Message.setKey(Number160 key) |
Message |
Message.setKeyCollection(KeyCollection key) |
Message |
Message.setKeyMap640(KeyMap640 keyMap) |
Message |
Message.setKeyMapByte(KeyMapByte keyMap) |
Message |
Message.setLong(long long0) |
Message |
Message.setMessageId(int messageId)
For deserialization, we need to set the id.
|
Message |
Message.setNeighborsSet(NeighborSet neighborSet) |
Message |
Message.setOptions(int options) |
Message |
Message.setPeerSocketAddresses(Collection<PeerSocketAddress> peerSocketAddresses) |
Message |
Message.setPublicKey(PublicKey publicKey) |
Message |
Message.setPublicKeyAndSign(KeyPair keyPair) |
Message |
Message.setRecipient(PeerAddress recipient)
Set the ID of the recipient.
|
Message |
Message.setSender(PeerAddress sender)
The ID of the sender.
|
Message |
Message.setStreaming() |
Message |
Message.setTrackerData(TrackerData trackerData) |
Message |
Message.setType(Message.Type type)
Set the message type.
|
Message |
Message.setVerified() |
Message |
Message.setVersion(int version)
For deserialization.
|
Message |
Message.streaming(boolean streaming) |
Message |
Message.udp(boolean udp) |
Message |
Message.verified(boolean verified) |
| Modifier and Type | Method and Description |
|---|---|
static Message.Content[] |
MessageHeaderCodec.decodeContentTypes(int contentTypes,
Message message)
Decodes the content types from a 32bit number.
|
static io.netty.buffer.ByteBuf |
MessageHeaderCodec.encodeHeader(io.netty.buffer.ByteBuf buffer,
Message message)
Encodes the message object.
|
boolean |
Encoder.write(AlternativeCompositeByteBuf buf,
Message message) |
| Constructor and Description |
|---|
MessageID(Message message)
Creates a message Id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DefaultBroadcastHandler.receive(Message message) |
void |
BroadcastHandler.receive(Message message)
This method is called when a peer receives a broadcast message request.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
DispatchHandler.createMessage(PeerAddress recipient,
byte name,
Message.Type type)
Create a request message and fills it with connection bean and peer bean parameters.
|
Message |
DispatchHandler.createResponseMessage(Message requestMessage,
Message.Type replyType)
Create a response message and fills it with connection bean and peer bean parameters.
|
static Message |
DispatchHandler.createResponseMessage(Message requestMessage,
Message.Type replyType,
PeerAddress peerAddress) |
| Modifier and Type | Method and Description |
|---|---|
Message |
DispatchHandler.createResponseMessage(Message requestMessage,
Message.Type replyType)
Create a response message and fills it with connection bean and peer bean parameters.
|
static Message |
DispatchHandler.createResponseMessage(Message requestMessage,
Message.Type replyType,
PeerAddress peerAddress) |
void |
DispatchHandler.forwardMessage(Message requestMessage,
PeerConnection peerConnection,
Responder responder)
Forwards the request to a handler.
|
void |
StorageRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
TrackerRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
DirectDataRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
PeerExchangeRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
QuitRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
NeighborRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
PingRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
BroadcastRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
abstract void |
DispatchHandler.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.
|
Copyright © 2014. All rights reserved.