|
||||||||||
| 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 to| Method Detail |
public void handlePingReply(PingReply pong,
ReplyHandler handler)
Implements ReplyHandler.
handlePingReply in interface ReplyHandlerhandler - the ReplyHandler to use for sending the reply
public void handleQueryReply(QueryReply hit,
ReplyHandler handler)
Implements ReplyHandler.
handleQueryReply in interface ReplyHandlerhit - the QueryReply to sendhandler - the ReplyHandler to use for sending the reply
public void handlePushRequest(PushRequest request,
ReplyHandler handler)
Implements ReplyHandler.
handlePushRequest in interface ReplyHandlerrequest - the QueryRequest to sendhandler - the ReplyHandler to use for sending the replypublic void countDroppedMessage()
countDroppedMessage in interface ReplyHandlerpublic java.util.Set getDomains()
getDomains in interface ReplyHandlerpublic boolean isPersonalSpam(Message m)
isPersonalSpam in interface ReplyHandlerpublic boolean isOpen()
ReplyHandler
isOpen in interface ReplyHandlerpublic int getNumMessagesReceived()
getNumMessagesReceived in interface ReplyHandlerpublic boolean isOutgoing()
isOutgoing in interface ReplyHandlerpublic boolean isKillable()
ReplyHandler
isKillable in interface ReplyHandlerpublic boolean isSupernodeClientConnection()
isSupernodeClientConnection in interface ReplyHandlerpublic boolean isLeafConnection()
isLeafConnection in interface ReplyHandlerpublic boolean isHighDegreeConnection()
isHighDegreeConnection in interface ReplyHandlerpublic boolean isUltrapeerQueryRoutingConnection()
isUltrapeerQueryRoutingConnection in interface ReplyHandlerpublic boolean isGoodUltrapeer()
isGoodUltrapeer in interface ReplyHandlerpublic boolean isGoodLeaf()
isGoodLeaf in interface ReplyHandlerpublic boolean supportsPongCaching()
supportsPongCaching in interface ReplyHandlerpublic boolean allowNewPings()
allowNewPings in interface ReplyHandlerpublic java.net.InetAddress getInetAddress()
ReplyHandler
getInetAddress in interface ReplyHandlerpublic boolean isStable()
isStable in interface ReplyHandlerpublic java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||