public class TrackerRPC extends ReplyHandler
Modifier and Type | Field and Description |
---|---|
static int |
MAX_MSG_SIZE_UDP |
Constructor and Description |
---|
TrackerRPC(PeerBean peerBean,
ConnectionBean connectionBean,
ConnectionConfiguration p2pConfiguration) |
Modifier and Type | Method and Description |
---|---|
FutureResponse |
addToTracker(PeerAddress remotePeer,
Number160 locationKey,
Number160 domainKey,
byte[] attachement,
boolean signMessage,
boolean primary,
Set<Number160> knownPeers,
ChannelCreator channelCreator,
boolean forceUDP,
boolean forceTCP) |
FutureResponse |
addToTracker(PeerAddress remotePeer,
Number160 locationKey,
Number160 domainKey,
byte[] attachement,
int offset,
int legth,
boolean signMessage,
boolean primary,
Set<Number160> knownPeers,
ChannelCreator channelCreator,
boolean forceUDP,
boolean forceTCP) |
FutureResponse |
getFromTracker(PeerAddress remotePeer,
Number160 locationKey,
Number160 domainKey,
boolean expectAttachement,
boolean signMessage,
Set<Number160> knownPeers,
ChannelCreator channelCreator) |
FutureResponse |
getFromTracker(PeerAddress remotePeer,
Number160 locationKey,
Number160 domainKey,
boolean expectAttachement,
boolean signMessage,
Set<Number160> knownPeers,
ChannelCreator channelCreator,
boolean forceUDP,
boolean forceTCP) |
PeerAddress |
getPeerAddress() |
Message |
handleResponse(Message message,
boolean sign)
If the message is OK, that has been previously checked by the user using
checkMessage, a reply to the message is generated here.
|
static boolean |
isPrimary(FutureResponse response) |
static boolean |
isSecondary(FutureResponse response) |
createMessage, createResponseMessage, exceptionCaught, forwardMessage, getConnectionBean, getPeerBean, registerIoHandler, setSignReply
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, messageReceived, setInterestOpsRequested, unbindRequested, writeComplete, writeRequested
public static final int MAX_MSG_SIZE_UDP
public TrackerRPC(PeerBean peerBean, ConnectionBean connectionBean, ConnectionConfiguration p2pConfiguration)
peerBean
- connectionBean
- public PeerAddress getPeerAddress()
public FutureResponse addToTracker(PeerAddress remotePeer, Number160 locationKey, Number160 domainKey, byte[] attachement, boolean signMessage, boolean primary, Set<Number160> knownPeers, ChannelCreator channelCreator, boolean forceUDP, boolean forceTCP)
public static boolean isPrimary(FutureResponse response)
public static boolean isSecondary(FutureResponse response)
public FutureResponse addToTracker(PeerAddress remotePeer, Number160 locationKey, Number160 domainKey, byte[] attachement, int offset, int legth, boolean signMessage, boolean primary, Set<Number160> knownPeers, ChannelCreator channelCreator, boolean forceUDP, boolean forceTCP)
public FutureResponse getFromTracker(PeerAddress remotePeer, Number160 locationKey, Number160 domainKey, boolean expectAttachement, boolean signMessage, Set<Number160> knownPeers, ChannelCreator channelCreator)
public FutureResponse getFromTracker(PeerAddress remotePeer, Number160 locationKey, Number160 domainKey, boolean expectAttachement, boolean signMessage, Set<Number160> knownPeers, ChannelCreator channelCreator, boolean forceUDP, boolean forceTCP)
public Message handleResponse(Message message, boolean sign) throws Exception
ReplyHandler
handleResponse
in class ReplyHandler
message
- Request messageException
Copyright © 2013. All Rights Reserved.