|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.UDPReplyHandler
This class is an implementation of ReplyHandler that is specialized for handling UDP messages.
Constructor Summary | |
UDPReplyHandler(java.net.InetAddress ip,
int port)
Constructor that sets the ip and port to reply to. |
Method Summary | |
boolean |
allowNewPings()
Returns whether or not to allow new pings from this ReplyHandler. |
void |
countDroppedMessage()
|
java.util.Set |
getDomains()
|
java.net.InetAddress |
getInetAddress()
Accessor for the InetAddress instance for this host. |
int |
getNumMessagesReceived()
|
void |
handlePingReply(PingReply pong,
ReplyHandler handler)
Sends the PingReply via a UDP datagram to the IP and port for this handler. |
void |
handlePushRequest(PushRequest request,
ReplyHandler handler)
Sends the QueryRequest via a UDP datagram to the IP and port for this handler. |
void |
handleQueryReply(QueryReply hit,
ReplyHandler handler)
Sends the QueryReply via a UDP datagram to the IP and port for this handler. |
boolean |
isGoodLeaf()
Returns false, as this node is not a "connection" in the first place, and so could never have sent the requisite headers. |
boolean |
isGoodUltrapeer()
Returns false, as this node is not a "connection" in the first place, and so could never have sent the requisite headers. |
boolean |
isHighDegreeConnection()
Returns whether or not this connection is a high-degree connection, meaning that it maintains a high number of intra-Ultrapeer connections. |
boolean |
isKillable()
Returns whether or not this handler is killable by the handler watchdog. |
boolean |
isLeafConnection()
Implements ReplyHandler interface. |
boolean |
isOpen()
Returns true if the reply handler is still able to handle a reply. |
boolean |
isOutgoing()
|
boolean |
isPersonalSpam(Message m)
|
boolean |
isStable()
Returns false to indicate that UDPReplyHandlers should never be considered stable, due to data loss over UDP and lack of knowledge as to whether the host is still alive. |
boolean |
isSupernodeClientConnection()
Implements ReplyHandler. |
boolean |
isUltrapeerQueryRoutingConnection()
Returns false since UDP reply handlers are not TCP connections in the first place. |
boolean |
supportsPongCaching()
Returns false, since we don't know whether a host communicating via UDP supports pong caching or not. |
java.lang.String |
toString()
Overrides toString to print out more detailed information about this UDPReplyHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UDPReplyHandler(java.net.InetAddress ip, int port)
ip
- the InetAddress to reply toport
- the port to reply toMethod Detail |
public void handlePingReply(PingReply pong, ReplyHandler handler)
Implements ReplyHandler.
handlePingReply
in interface ReplyHandler
handler
- the ReplyHandler to use for sending the replypublic void handleQueryReply(QueryReply hit, ReplyHandler handler)
Implements ReplyHandler.
handleQueryReply
in interface ReplyHandler
hit
- the QueryReply to sendhandler
- the ReplyHandler to use for sending the replypublic void handlePushRequest(PushRequest request, ReplyHandler handler)
Implements ReplyHandler.
handlePushRequest
in interface ReplyHandler
request
- the QueryRequest to sendhandler
- the ReplyHandler to use for sending the replypublic void countDroppedMessage()
countDroppedMessage
in interface ReplyHandler
public java.util.Set getDomains()
getDomains
in interface ReplyHandler
public boolean isPersonalSpam(Message m)
isPersonalSpam
in interface ReplyHandler
public boolean isOpen()
ReplyHandler
isOpen
in interface ReplyHandler
public int getNumMessagesReceived()
getNumMessagesReceived
in interface ReplyHandler
public boolean isOutgoing()
isOutgoing
in interface ReplyHandler
public boolean isKillable()
ReplyHandler
isKillable
in interface ReplyHandler
public boolean isSupernodeClientConnection()
isSupernodeClientConnection
in interface ReplyHandler
public boolean isLeafConnection()
isLeafConnection
in interface ReplyHandler
public boolean isHighDegreeConnection()
isHighDegreeConnection
in interface ReplyHandler
public boolean isUltrapeerQueryRoutingConnection()
isUltrapeerQueryRoutingConnection
in interface ReplyHandler
public boolean isGoodUltrapeer()
isGoodUltrapeer
in interface ReplyHandler
public boolean isGoodLeaf()
isGoodLeaf
in interface ReplyHandler
public boolean supportsPongCaching()
supportsPongCaching
in interface ReplyHandler
public boolean allowNewPings()
allowNewPings
in interface ReplyHandler
public java.net.InetAddress getInetAddress()
ReplyHandler
getInetAddress
in interface ReplyHandler
public boolean isStable()
isStable
in interface ReplyHandler
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |