org.opennfc.p2p
Enum P2PManager.Mode

Object
  extended by Enum<P2PManager.Mode>
      extended by org.opennfc.p2p.P2PManager.Mode
All Implemented Interfaces:
Serializable, Comparable<P2PManager.Mode>
Enclosing interface:
P2PManager

public static enum P2PManager.Mode
extends Enum<P2PManager.Mode>

This class provides the Peer to Peer modes.

Since:
Open NFC 4.1

Enum Constant Summary
CLIENT
          Type of P2P connection oriented socket: client.
CLIENT_SERVER
          Type of P2P connection oriented socket: client/server.
SERVER
          Type of P2P connection oriented socket: server.
 
Method Summary
 int getValue()
          Returns the type value.
static P2PManager.Mode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static P2PManager.Mode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLIENT

public static final P2PManager.Mode CLIENT
Type of P2P connection oriented socket: client.

Since:
Open NFC 4.1

SERVER

public static final P2PManager.Mode SERVER
Type of P2P connection oriented socket: server.

Since:
Open NFC 4.1

CLIENT_SERVER

public static final P2PManager.Mode CLIENT_SERVER
Type of P2P connection oriented socket: client/server.

Since:
Open NFC 4.1
Method Detail

values

public static P2PManager.Mode[] 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 (P2PManager.Mode c : P2PManager.Mode.values())
    System.out.println(c);

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

valueOf

public static P2PManager.Mode 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

getValue

public int getValue()
Returns the type value.

Returns:
the type value.

Copyright © 2010-2011 Inside Secure
Except as noted, this content is licensed under Apache 2.0 License.