com.limegroup.gnutella.handshaking
Class LeafHandshakeResponder

java.lang.Object
  extended bycom.limegroup.gnutella.handshaking.AuthenticationHandshakeResponder
      extended bycom.limegroup.gnutella.handshaking.LeafHandshakeResponder
All Implemented Interfaces:
HandshakeResponder

public final class LeafHandshakeResponder
extends AuthenticationHandshakeResponder

A very simple responder to be used by leaf-nodes during the connection handshake while accepting incoming connections


Field Summary
 
Fields inherited from class com.limegroup.gnutella.handshaking.AuthenticationHandshakeResponder
_manager, RECORD_STATS
 
Constructor Summary
LeafHandshakeResponder(java.lang.String host)
          Creates a new instance of LeafHandshakeResponder
 
Method Summary
protected  HandshakeResponse respondUnauthenticated(HandshakeResponse response, boolean outgoing)
          Returns the corresponding handshake to be sent to the remote host when responding to the connection handshake response received.
 
Methods inherited from class com.limegroup.gnutella.handshaking.AuthenticationHandshakeResponder
getRemoteIP, respond
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeafHandshakeResponder

public LeafHandshakeResponder(java.lang.String host)
Creates a new instance of LeafHandshakeResponder

Parameters:
host - The host with whom we are handshaking
Method Detail

respondUnauthenticated

protected HandshakeResponse respondUnauthenticated(HandshakeResponse response,
                                                   boolean outgoing)
                                            throws java.io.IOException
Description copied from class: AuthenticationHandshakeResponder
Returns the corresponding handshake to be sent to the remote host when responding to the connection handshake response received.

Specified by:
respondUnauthenticated in class AuthenticationHandshakeResponder
Parameters:
response - The response received from the host on the other side of the connection.
outgoing - whether the connection to the remote host is an outgoing connection.
Returns:
the response to be sent to the remote host
Throws:
java.io.IOException