|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.handshaking.AuthenticationHandshakeResponder
An authentication-capable responder to be used during handshake. This is an abstract class, and provides only authentication capablities.
Concrete subclasses should implement the respondUnAuthenticated() method for the actual handshake (apart from authentication).
The public respond(response, outgoing) method should not be overwritten before taking this statement out.
Field Summary | |
protected ConnectionManager |
_manager
An instance of connection manager (to reference other stuff held by connection manager) |
protected static boolean |
RECORD_STATS
|
Constructor Summary | |
AuthenticationHandshakeResponder(ConnectionManager manager,
java.lang.String host)
Creates a new instance |
Method Summary | |
protected java.lang.String |
getRemoteIP()
Returns the Remote IP |
HandshakeResponse |
respond(HandshakeResponse response,
boolean outgoing)
Returns the corresponding handshake to be written to the remote host when responding to the connection handshake response just received. |
protected abstract 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final boolean RECORD_STATS
protected final ConnectionManager _manager
Constructor Detail |
public AuthenticationHandshakeResponder(ConnectionManager manager, java.lang.String host)
manager
- Instance of connection manager, managing this
connectionhost
- The host with whom we are handshakingMethod Detail |
public HandshakeResponse respond(HandshakeResponse response, boolean outgoing) throws java.io.IOException
HandshakeResponder
respond
in interface HandshakeResponder
response
- The response received from the host on the
other side of teh connection.outgoing
- whether the connection to the remote host is an outgoing
connection.
java.io.IOException
protected java.lang.String getRemoteIP()
protected abstract HandshakeResponse respondUnauthenticated(HandshakeResponse response, boolean outgoing) throws java.io.IOException
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.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |