| Package | Description |
|---|---|
| net.tomp2p.connection | |
| net.tomp2p.futures | |
| net.tomp2p.message | |
| net.tomp2p.p2p | |
| net.tomp2p.rpc |
| Modifier and Type | Method and Description |
|---|---|
DispatchHandler |
Dispatcher.associatedHandler(Message message)
Checks if we have a handler for the given message.
|
protected void |
RequestHandler.channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Message responseMessage) |
protected void |
Dispatcher.channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Message message) |
void |
Responder.response(Message responseMessage) |
void |
Sender.sendSelf(FutureResponse futureResponse,
Message message)
In case a message is sent to the sender itself, this is the cutoff.
|
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.
|
SendBehavior.SendMethod |
DefaultSendBehavior.tcpSendBehavior(Message message) |
SendBehavior.SendMethod |
SendBehavior.tcpSendBehavior(Message message)
Returns the send behavior depending on the message to be sent over TCP.
|
SendBehavior.SendMethod |
DefaultSendBehavior.udpSendBehavior(Message message) |
SendBehavior.SendMethod |
SendBehavior.udpSendBehavior(Message message)
Returns the send behavior depending on the message to be sent over 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.request()
The future response always keeps a reference to the request.
|
Message |
FutureResponse.responseMessage()
Returns the response message.
|
| Modifier and Type | Method and Description |
|---|---|
BaseFuture.FutureType |
FutureSuccessEvaluatorOperation.evaluate(Message requestMessage,
Message responseMessage) |
BaseFuture.FutureType |
FutureSuccessEvaluatorCommunication.evaluate(Message requestMessage,
Message responseMessage) |
BaseFuture.FutureType |
FutureSuccessEvaluator.evaluate(Message requestMessage,
Message responseMessage)
Evaluates if a request is a success.
|
void |
FutureResponse.progress(Message interMediateMessage)
This will be called by the TomP2P library when a partial message is ready.
|
void |
ProgressListener.progress(Message interMediateMessage) |
FutureResponse |
FutureResponse.response(Message responseMessage)
Gets called if a peer responds.
|
boolean |
FutureResponse.responseLater(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 |
|---|---|
Message |
Message.bloomFilter(SimpleBloomFilter<Number160> bloomFilter) |
Message |
Message.buffer(Buffer byteBuf) |
Message |
Message.command(byte command)
Command of the message, such as GET, PING, etc.
|
Message |
Message.contentType(int index,
Message.Content contentType)
Sets or replaces the content type at a specific index.
|
Message |
Message.contentType(Message.Content contentType)
Convenient method to set content type.
|
Message |
Message.contentTypes(Message.Content[] contentTypes)
Used for deserialization.
|
static Message |
MessageHeaderCodec.decodeHeader(io.netty.buffer.ByteBuf buffer,
InetSocketAddress recipientSocket,
InetSocketAddress senderSocket)
Decodes a message object.
|
Message |
Message.hasContent(boolean content) |
Message |
Message.intValue(int integer) |
Message |
Message.keepAlive(boolean isKeepAlive) |
Message |
Message.key(Number160 key) |
Message |
Message.keyCollection(KeyCollection key) |
Message |
Message.keyMap640Keys(KeyMap640Keys keyMap) |
Message |
Message.keyMapByte(KeyMapByte keyMap) |
Message |
Message.longValue(long long0) |
Message |
Encoder.message() |
Message |
Decoder.message() |
Message |
Message.messageId(int messageId)
For deserialization, we need to set the id.
|
Message |
Message.neighborsSet(NeighborSet neighborSet) |
Message |
Message.options(int options) |
Message |
Message.peerSocketAddresses(Collection<PeerSocketAddress> peerSocketAddresses) |
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.publicKey(PublicKey publicKey) |
Message |
Message.publicKeyAndSign(KeyPair keyPair) |
Message |
Message.receivedSignature(SignatureCodec signatureEncode) |
Message |
Message.recipient(PeerAddress recipient)
Set the ID of the recipient.
|
Message |
Message.recipientRelay(PeerAddress recipientRelay) |
Message |
Message.recipientSocket(InetSocketAddress recipientSocket)
Store the recipient of the packet.
|
Message |
Message.sender(PeerAddress sender)
The ID of the sender.
|
Message |
Message.senderSocket(InetSocketAddress senderSocket)
Store the sender of the packet.
|
Message |
Message.setDataMap(DataMap dataMap) |
Message |
Message.setDone()
Set done to true if message decoding or encoding is done.
|
Message |
Message.setDone(boolean done) |
Message |
Message.setHintSign()
Set if we have a signed message.
|
Message |
Message.setVerified() |
Message |
Message.streaming() |
Message |
Message.streaming(boolean streaming) |
Message |
Message.trackerData(TrackerData trackerData) |
Message |
Message.type(Message.Type type)
Set the message type.
|
Message |
Message.udp(boolean udp) |
Message |
Message.verified(boolean verified) |
Message |
Message.version(int version)
For deserialization.
|
| Modifier and Type | Method and Description |
|---|---|
static Message.Content[] |
MessageHeaderCodec.decodeContentTypes(int contentTypes,
Message message)
Decodes the 8 content types from an integer (32 bit).
|
static void |
MessageHeaderCodec.encodeHeader(io.netty.buffer.ByteBuf buffer,
Message message)
Encodes a message object.
|
boolean |
Encoder.write(AlternativeCompositeByteBuf buf,
Message message,
SignatureCodec signatureCodec) |
| Constructor and Description |
|---|
MessageID(Message message)
Creates a message Id.
|
| Modifier and Type | Method and Description |
|---|---|
void |
BroadcastHandler.receive(Message message)
This method is called when a peer receives a broadcast message request.
|
void |
DefaultBroadcastHandler.receive(Message message) |
| 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 |
NeighborRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
PingRPC.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.
|
void |
BroadcastRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
DirectDataRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
AnnounceRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
void |
QuitRPC.handleResponse(Message message,
PeerConnection peerConnection,
boolean sign,
Responder responder) |
Copyright © 2014. All rights reserved.