org.opennfc.p2p
Enum P2PConnection.P2PConnectionParameter

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

public static enum P2PConnection.P2PConnectionParameter
extends Enum<P2PConnection.P2PConnectionParameter>

This class collects the P2P connection parameters.

Since:
Open NFC 4.1

Enum Constant Summary
CONNECTION_ESTABLISHED
          Connection oriented status.
DATA_AVAILABLE
          Data availability status.
IS_SERVER
          If true, the socket is server, if false, the socket is client.
LOCAL_MIU
          Local MIU for connection oriented.
LOCAL_RW
          Local Receive Window for connection oriented.
LOCAL_SAP
          Local SAP associated to the connection.
REMOTE_MIU
          Remote MIU associated to a established connection-oriented.
REMOTE_RW
          Remote RW associated to a established connection-oriented.
REMOTE_SAP
          Remote SAP associated to a established connection-oriented.
 
Method Summary
 int getValue()
          Returns the property value.
static P2PConnection.P2PConnectionParameter valueOf(String name)
          Returns the enum constant of this type with the specified name.
static P2PConnection.P2PConnectionParameter[] 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

LOCAL_MIU

public static final P2PConnection.P2PConnectionParameter LOCAL_MIU
Local MIU for connection oriented.

This parameter is sent during the establishment of the connection. It allows to specify the maximum packet size in bytes we are able to receive.

Must be in the range [128-256]

The current parameter value can be retrieved using getParameter() and set using setParameter().

If the connection is already established, setting the value will only apply on next connection.

Since:
Open NFC 4.1

LOCAL_RW

public static final P2PConnection.P2PConnectionParameter LOCAL_RW
Local Receive Window for connection oriented.

This parameter is sent during the establishment of the connection.

Must be in the range [0-15]

The current parameter value can be retrieved using getParameter() and set using setParameter().

If the connection is already established, setting the value will only apply on next connection.

Since:
Open NFC 4.1

CONNECTION_ESTABLISHED

public static final P2PConnection.P2PConnectionParameter CONNECTION_ESTABLISHED
Connection oriented status.

The current parameter value can be retrieved using getParameter().

If not zero, the connection is established. If set to zero, the connection is not established.

Since:
Open NFC 4.1

DATA_AVAILABLE

public static final P2PConnection.P2PConnectionParameter DATA_AVAILABLE
Data availability status.

The current parameter value can be retrieved using getParameter().

If not zero, some data can be received on the connection.

Since:
Open NFC 4.1

LOCAL_SAP

public static final P2PConnection.P2PConnectionParameter LOCAL_SAP
Local SAP associated to the connection.

The current parameter value can be retrieved using getParameter().

Since:
Open NFC 4.1

REMOTE_SAP

public static final P2PConnection.P2PConnectionParameter REMOTE_SAP
Remote SAP associated to a established connection-oriented.

The current parameter value can be retrieved using getParameter().

This parameter indicates the maximum frame size we are able to send to the peer.

Since:
Open NFC 4.1

REMOTE_MIU

public static final P2PConnection.P2PConnectionParameter REMOTE_MIU
Remote MIU associated to a established connection-oriented.

The current parameter value can be retrieved using getParameter().

This parameter indicates the maximum packet size we are able to send to the peer.

Since:
Open NFC 4.1

REMOTE_RW

public static final P2PConnection.P2PConnectionParameter REMOTE_RW
Remote RW associated to a established connection-oriented.

The current parameter value can be retrieved using getParameter().

This parameter indicates the maximum number of I PDU that can be sent to the peer without receiving acknowledge.

Since:
Open NFC 4.1

IS_SERVER

public static final P2PConnection.P2PConnectionParameter IS_SERVER
If true, the socket is server, if false, the socket is client.

The current parameter value can be retrieved using getParameter().

This parameter allows to know how a client/server socket has been established.

Since:
Open NFC 4.1
Method Detail

values

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

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

valueOf

public static P2PConnection.P2PConnectionParameter 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 property value.

Returns:
the property value.

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