net.tomp2p.peers
Enum PeerStatusListener.Reason

java.lang.Object
  extended by java.lang.Enum<PeerStatusListener.Reason>
      extended by net.tomp2p.peers.PeerStatusListener.Reason
All Implemented Interfaces:
Serializable, Comparable<PeerStatusListener.Reason>
Enclosing interface:
PeerStatusListener

public static enum PeerStatusListener.Reason
extends Enum<PeerStatusListener.Reason>

The reason NOT_REACHABLE means that the peer is offline and cannot be contacted, while REMOVED_FROM_MAP means that this peer has been removed from the neigbhor list, but may still be reachable.


Enum Constant Summary
NOT_REACHABLE
           
REMOVED_FROM_MAP
           
 
Method Summary
static PeerStatusListener.Reason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PeerStatusListener.Reason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REMOVED_FROM_MAP

public static final PeerStatusListener.Reason REMOVED_FROM_MAP

NOT_REACHABLE

public static final PeerStatusListener.Reason NOT_REACHABLE
Method Detail

values

public static PeerStatusListener.Reason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PeerStatusListener.Reason c : PeerStatusListener.Reason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PeerStatusListener.Reason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013. All Rights Reserved.