LimeWire Consolidated API

com.limegroup.gnutella
Interface ReplyHandler

All Superinterfaces:
IpPort
All Known Subinterfaces:
RoutedConnection
All Known Implementing Classes:
ForMeReplyHandler, GnutellaConnection, UDPReplyHandler

public interface ReplyHandler
extends IpPort

An interface for those things that handle replies and thus are placed as values in RouteTables.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.limewire.io.IpPort
IpPort.IpComparator, IpPort.IpPortComparator
 
Field Summary
 
Fields inherited from interface org.limewire.io.IpPort
COMPARATOR, EMPTY_LIST, EMPTY_SET, IP_COMPARATOR
 
Method Summary
 boolean allowNewPings()
          Determines whether new pings should be allowed from this reply handler.
 void countDroppedMessage()
           
 byte[] getClientGUID()
          Gets the clientGUID of this ReplyHandler.
 String getLocalePref()
          access the locale thats associated with this replyhandler
 int getNumMessagesReceived()
           
 void handlePingReply(PingReply pingReply, ReplyHandler handler)
          Handle the PingReply, failing silently
 void handlePushRequest(PushRequest pushRequest, ReplyHandler handler)
          Handle the PushRequest, failing silently
 void handleQueryReply(QueryReply queryReply, ReplyHandler handler)
          Handle the QueryReply, failing silently
 void handleSimppVM(SimppVM simppVM)
          Handles SimppVM
 boolean isGoodLeaf()
          Returns whether or not this handler is considered a "good" leaf connection.
 boolean isGoodUltrapeer()
          Returns whether or not this handler is considered a "good" Ultrapeer connection.
 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()
          Returns whether or not this reply handler is a leaf -- whether or not the host on the other end of this connection is a leaf of this (necessarily) Ultrapeer.
 boolean isOpen()
          Returns true if the reply handler is still able to handle a reply.
 boolean isOutgoing()
           
 boolean isPersonalSpam(Message m)
           
 boolean isStable()
          Determines whether or not this ReplyHandler is considered stable.
 boolean isSupernodeClientConnection()
          Returns whether or not this ReplyHandler sends replies from an Ultrapeer to a leaf.
 boolean isUltrapeerQueryRoutingConnection()
          Returns whether or not this handler uses Ultrapeer query routing.
 void reply(Message m)
          Just sends whatever message we ask it to.
 boolean supportsPongCaching()
          Returns whether or not this node supports pong caching.
 
Methods inherited from interface org.limewire.io.IpPort
getAddress, getInetAddress, getInetSocketAddress, getPort
 

Method Detail

handlePingReply

void handlePingReply(PingReply pingReply,
                     ReplyHandler handler)
Handle the PingReply, failing silently


handleQueryReply

void handleQueryReply(QueryReply queryReply,
                      ReplyHandler handler)
Handle the QueryReply, failing silently


handlePushRequest

void handlePushRequest(PushRequest pushRequest,
                       ReplyHandler handler)
Handle the PushRequest, failing silently


getNumMessagesReceived

int getNumMessagesReceived()

countDroppedMessage

void countDroppedMessage()

isPersonalSpam

boolean isPersonalSpam(Message m)

isOutgoing

boolean isOutgoing()

isKillable

boolean isKillable()
Returns whether or not this handler is killable by the handler watchdog. In particular, this is used for old Clip2 indexing queries, which should not be killed.

Returns:
true if the handler is 'killable', i.e. a clip2 indexing query, otherwise false

isSupernodeClientConnection

boolean isSupernodeClientConnection()
Returns whether or not this ReplyHandler sends replies from an Ultrapeer to a leaf. This returns true only if this node is an Ultrapeer, and the node receiving these replies is a leaf of that Ultrapeer.

Returns:
true if this node is an Ultrapeer, and the node it is sending replies to is a leaf, otherwise returns false

isOpen

boolean isOpen()
Returns true if the reply handler is still able to handle a reply.


isLeafConnection

boolean isLeafConnection()
Returns whether or not this reply handler is a leaf -- whether or not the host on the other end of this connection is a leaf of this (necessarily) Ultrapeer.

Returns:
true if the host on the other end of this connection is a leaf, making this an Ultrapeer, false otherwise

isHighDegreeConnection

boolean isHighDegreeConnection()
Returns whether or not this connection is a high-degree connection, meaning that it maintains a high number of intra-Ultrapeer connections.

Returns:
true if this is a 'high-degree' connection, otherwise false

isUltrapeerQueryRoutingConnection

boolean isUltrapeerQueryRoutingConnection()
Returns whether or not this handler uses Ultrapeer query routing.

Returns:
true if this connection uses query routing between Ultrapeers, otherwise false

isGoodUltrapeer

boolean isGoodUltrapeer()
Returns whether or not this handler is considered a "good" Ultrapeer connection. The definition of a good connection changes over time as new features are released.

Returns:
true if this is considered a good Ultrapeer connection, otherwise false

isGoodLeaf

boolean isGoodLeaf()
Returns whether or not this handler is considered a "good" leaf connection. The definition of a good connection changes over time as new features are released.

Returns:
true if this is considered a good leaf connection, otherwise false

supportsPongCaching

boolean supportsPongCaching()
Returns whether or not this node supports pong caching.

Returns:
true if this node supports pong caching, otherwise false

allowNewPings

boolean allowNewPings()
Determines whether new pings should be allowed from this reply handler. Pings should only be accepted if we have not seen another ping from this handler in a given number of milliseconds, avoiding messages bursts.

Returns:
true if new pings are allowed, otherwise false

isStable

boolean isStable()
Determines whether or not this ReplyHandler is considered stable. For TCP connections, this will mean that the connection has been alive for some minimal period of time, while UDP handlers will never be considered stable.

Returns:
true if this ReplyHandler has been up long enough to be considered "stable"

getLocalePref

String getLocalePref()
access the locale thats associated with this replyhandler


reply

void reply(Message m)
Just sends whatever message we ask it to.


handleSimppVM

void handleSimppVM(SimppVM simppVM)
                   throws IOException
Handles SimppVM

Throws:
IOException

getClientGUID

byte[] getClientGUID()
Gets the clientGUID of this ReplyHandler.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.