com.limegroup.gnutella.handshaking
Class NoGnutellaOkException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended bycom.limegroup.gnutella.handshaking.NoGnutellaOkException
All Implemented Interfaces:
java.io.Serializable

public final class NoGnutellaOkException
extends java.io.IOException

Exception thrown when someone understands responds with a handshaking code other than 200 or 401.

See Also:
Serialized Form

Field Summary
static NoGnutellaOkException CLIENT_REJECT
          Cached NoGnutellaOkException for the case where we as the client are rejecting the connection with a 503.
static NoGnutellaOkException SERVER_REJECT
          Cached NoGnutellaOkException for the case where the server rejected the connection with a 503.
static NoGnutellaOkException UNRESOLVED_CLIENT
          Cached NoGnutellaOkException for the case where the handshake never resolved successfully on the cleint side.
static NoGnutellaOkException UNRESOLVED_SERVER
          Cached NoGnutellaOkException for the case where the handshake never resolved successfully on the server side.
 
Method Summary
static NoGnutellaOkException createClientUnknown(int code)
          Creates a new NoGnutellaOkException from an unknown client response.
static NoGnutellaOkException createServerUnknown(int code)
          Creates a new NoGnutellaOkException from an unknown server response.
 int getCode()
          The offending status code.
 boolean wasMe()
          Returns true if the exception was caused by something this host wrote.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVER_REJECT

public static final NoGnutellaOkException SERVER_REJECT
Cached NoGnutellaOkException for the case where the server rejected the connection with a 503.


CLIENT_REJECT

public static final NoGnutellaOkException CLIENT_REJECT
Cached NoGnutellaOkException for the case where we as the client are rejecting the connection with a 503.


UNRESOLVED_CLIENT

public static final NoGnutellaOkException UNRESOLVED_CLIENT
Cached NoGnutellaOkException for the case where the handshake never resolved successfully on the cleint side.


UNRESOLVED_SERVER

public static final NoGnutellaOkException UNRESOLVED_SERVER
Cached NoGnutellaOkException for the case where the handshake never resolved successfully on the server side.

Method Detail

createClientUnknown

public static NoGnutellaOkException createClientUnknown(int code)
Creates a new NoGnutellaOkException from an unknown client response.

Parameters:
code - the response code from the server

createServerUnknown

public static NoGnutellaOkException createServerUnknown(int code)
Creates a new NoGnutellaOkException from an unknown server response.

Parameters:
code - the response code from the server

wasMe

public boolean wasMe()
Returns true if the exception was caused by something this host wrote.


getCode

public int getCode()
The offending status code.