| Package | Description |
|---|---|
| net.tomp2p.connection | |
| net.tomp2p.futures | |
| net.tomp2p.p2p | |
| net.tomp2p.rpc |
| Modifier and Type | Class and Description |
|---|---|
class |
RequestHandler<K extends FutureResponse>
Is able to send UDP messages (as a request) and processes incoming replies.
|
| Modifier and Type | Method and Description |
|---|---|
ConcurrentHashMap<Integer,FutureResponse> |
Sender.cachedRequests()
Get currently cached requests.
|
Map<Integer,FutureResponse> |
Dispatcher.getPendingRequests() |
| Modifier and Type | Method and Description |
|---|---|
FutureChannelCreator |
PeerConnection.acquire(FutureResponse futureResponse) |
void |
Dispatcher.addPendingRequest(int messageId,
FutureResponse futureResponse,
int timeout,
ScheduledExecutorService scheduler)
Add a new pending request.
|
io.netty.channel.ChannelFuture |
ChannelCreator.createTCP(SocketAddress socketAddress,
int connectionTimeoutMillis,
Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers,
FutureResponse futureResponse)
Creates a channel to the given address.
|
io.netty.channel.ChannelFuture |
ChannelCreator.createUDP(boolean broadcast,
Map<String,Pair<io.netty.util.concurrent.EventExecutorGroup,io.netty.channel.ChannelHandler>> channelHandlers,
FutureResponse futureResponse)
Creates a "channel" to the given address.
|
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.
|
io.netty.channel.ChannelFuture |
ChannelCreator.setupCloseListener(io.netty.channel.ChannelFuture channelFuture,
FutureResponse futureResponse)
Setup the close listener for a channel that was already created
|
| Constructor and Description |
|---|
PeerException(FutureResponse future) |
TimeoutFactory(FutureResponse futureResponse,
int timeoutSeconds,
List<PeerStatusListener> peerStatusListeners,
String name) |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
FutureResponse.emptyResponse()
If we don't get a reply message, which is the case for fire-and-forget messages, then set the reply to null and
set this future to complete with the type Success.
|
FutureResponse |
FutureDirect.futureResponse() |
FutureResponse |
FutureResponse.progress()
This will be called by the user, when the user provides more data.
|
FutureResponse |
FutureResponse.progressFirst()
Do not call this directly, as this is called from the TomP2P library.
|
FutureResponse |
FutureResponse.progressHandler(ProgresHandler progressHandler)
Set the user based progres handler, where the user can add more data and call
progress() when data has
been added. |
FutureResponse |
FutureResponse.response(Message responseMessage)
Gets called if a peer responds.
|
FutureResponse |
FutureResponse.responseNow() |
| Constructor and Description |
|---|
FutureDirect(FutureResponse futureResponse) |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
RoutingMechanism.futureResponse(int i) |
FutureResponse |
RoutingMechanism.futureResponse(int i,
FutureResponse futureResponse) |
| Modifier and Type | Method and Description |
|---|---|
AtomicReferenceArray<FutureResponse> |
RoutingMechanism.futureResponses() |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
RoutingMechanism.futureResponse(int i,
FutureResponse futureResponse) |
| Constructor and Description |
|---|
RoutingMechanism(AtomicReferenceArray<FutureResponse> futureResponses,
FutureRouting futureRoutingResponse,
Collection<PeerFilter> peerFilters)
Creates the routing mechanism.
|
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
AnnounceRPC.broadcast(PeerAddress remotePeer,
ConnectionConfiguration configuration,
ChannelCreator channelCreator) |
FutureResponse |
NeighborRPC.closeNeighbors(PeerAddress remotePeer,
NeighborRPC.SearchValues searchValues,
Message.Type type,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Requests close neighbors from the remote peer.
|
FutureResponse |
PingRPC.fireTCP(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a TCP peer, but don't expect an answer.
|
FutureResponse |
PingRPC.fireUDP(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a UDP peer, but don't expect an answer.
|
FutureResponse |
AnnounceRPC.ping(PeerAddress remotePeer,
ConnectionConfiguration configuration,
ChannelCreator channelCreator) |
FutureResponse |
PingRPC.pingBroadcastUDP(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a UDP peer using layer 2 broadcast.
|
FutureResponse |
PingRPC.pingTCP(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a TCP peer.
|
FutureResponse |
PingRPC.pingTCPDiscover(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a TCP peer, and find out how the other peer sees us.
|
FutureResponse |
PingRPC.pingTCPProbe(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a TCP peer, and request the other peer to ping us on our public address with a fire and forget message.
|
FutureResponse |
PingRPC.pingUDP(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a UDP peer.
|
FutureResponse |
PingRPC.pingUDPDiscover(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a UDP peer, and find out how the other peer sees us.
|
FutureResponse |
PingRPC.pingUDPProbe(PeerAddress remotePeer,
ChannelCreator channelCreator,
ConnectionConfiguration configuration)
Ping a UDP peer, and request the other peer to ping us on our public address with a fire and forget message.
|
FutureResponse |
QuitRPC.quit(PeerAddress remotePeer,
ShutdownBuilder shutdownBuilder,
ChannelCreator channelCreator)
Sends a message that indicates this peer is about to quit.
|
FutureResponse |
BroadcastRPC.send(PeerAddress remotePeer,
BroadcastBuilder broadcastBuilder,
ChannelCreator channelCreator,
ConnectionConfiguration configuration) |
FutureResponse |
DirectDataRPC.send(PeerAddress remotePeer,
SendDirectBuilderI sendDirectBuilder,
ChannelCreator channelCreator) |
| Modifier and Type | Method and Description |
|---|---|
RequestHandler<FutureResponse> |
PingRPC.ping(PeerAddress remotePeer,
ConnectionConfiguration configuration)
Ping with UDP or TCP, but do not send yet.
|
RequestHandler<FutureResponse> |
DirectDataRPC.sendInternal(PeerAddress remotePeer,
SendDirectBuilderI sendDirectBuilder)
Send data directly to a peer.
|
Copyright © 2014. All rights reserved.