|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.MessageRouter
com.limegroup.gnutella.StandardMessageRouter
This class is the message routing implementation for TCP messages.
Field Summary |
Fields inherited from class com.limegroup.gnutella.MessageRouter |
_clientGUID, _manager, UNICASTER |
Constructor Summary | |
StandardMessageRouter()
|
Method Summary | |
protected java.util.List |
createQueryReply(byte[] guid,
byte ttl,
long speed,
Response[] res,
byte[] clientGUID,
boolean busy,
boolean uploaded,
boolean measuredSpeed,
boolean isFromMcast)
Creates a List of QueryReply instances with compressed XML data, if requested. |
protected void |
handlePingReply(PingReply pingReply,
ReplyHandler receivingConnection)
The default handler for PingRequests received in ManagedConnection.loopForMessages(). |
protected void |
respondToPingRequest(PingRequest ping,
ReplyHandler handler)
Responds to a Gnutella ping with cached pongs. |
protected boolean |
respondToQueryRequest(QueryRequest queryRequest,
byte[] clientGUID)
Respond to the query request. |
protected void |
respondToUDPPingRequest(PingRequest request,
java.net.DatagramPacket datagram,
ReplyHandler handler)
Responds to a ping request received over a UDP port. |
boolean |
sendResponses(Response[] responses,
QueryRequest query)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StandardMessageRouter()
Method Detail |
protected void respondToPingRequest(PingRequest ping, ReplyHandler handler)
respondToPingRequest
in class MessageRouter
ping
- the PingRequest to respond tohandler
- the ReplyHandler to send any pongs toprotected void respondToUDPPingRequest(PingRequest request, java.net.DatagramPacket datagram, ReplyHandler handler)
respondToUDPPingRequest
in class MessageRouter
request
- the PingRequest to servicedatagram
- the DatagramPacket containing the IP
and port of the client nodehandler
- the ReplyHandler that should handle any
repliesprotected void handlePingReply(PingReply pingReply, ReplyHandler receivingConnection)
MessageRouter
In all cases, the ping reply is recorded into the host catcher.
Override as desired, but you probably want to call super.handlePingReply if you do.
handlePingReply
in class MessageRouter
protected boolean respondToQueryRequest(QueryRequest queryRequest, byte[] clientGUID)
MessageRouter
respondToQueryRequest
in class MessageRouter
public boolean sendResponses(Response[] responses, QueryRequest query)
protected java.util.List createQueryReply(byte[] guid, byte ttl, long speed, Response[] res, byte[] clientGUID, boolean busy, boolean uploaded, boolean measuredSpeed, boolean isFromMcast)
createQueryReply
in class MessageRouter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |