net.rim.device.api.io.nfc.handover
Class ConnectionHandoverFailedEvent

java.lang.Object
  extended by net.rim.device.api.io.nfc.handover.ConnectionHandoverEvent
      extended by net.rim.device.api.io.nfc.handover.ConnectionHandoverFailedEvent

public class ConnectionHandoverFailedEvent
extends ConnectionHandoverEvent

Represents a failed connection handover event.

Since:
BlackBerry API 7.1.0

Field Summary
static int FATAL_NFC_SUBSYSTEM_ERROR
          Indicates a failure occurred because of a fatal NFC subsystem error.
static int HANDOVER_TIMEOUT
          Indicates a failure occurred because the handover process timed out.
static int LOCAL_TRANSPORT_UNAVAILABLE
          Indicates a failure occurred because the transport was unavailable on the device.
static int NO_TRANSPORT_AVAILABLE
          Indicates a failure occurred because the transport type is unavailable.
static int REMOTE_TRANSPORT_UNAVAILABLE
          Indicates a failure occurred because the transport was unavailable on the partner device.
static int TRANSPORT_ERROR
          Indicates a failure occurred for a transport-specific reason.
static int TRANSPORT_HANDOVER_CANCELED
          Indicates a failure occurred because the user cancelled the request.
static int TRANSPORT_POWERED_OFF
          Indicates a failure occurred because the transport is powered off.
static int TRANSPORT_UNKNOWN
          Indicates a failure occurred for a transport-specific reason.
 
Fields inherited from class net.rim.device.api.io.nfc.handover.ConnectionHandoverEvent
BLUETOOTH_TRANSPORT, REQUESTER_P2P_DETECTED, SELECTOR_P2P_DETECTED, SELECTOR_TAG_READ
 
Constructor Summary
ConnectionHandoverFailedEvent(int eventType, int reasonFailed)
          Creates a connection handover failed event.
 
Method Summary
 int getFailedReason()
          Gets the connection handover failure reason.
 int getTransportReason(int transport)
          Gets the connection handover failure reason for the transport type specified.
 
Methods inherited from class net.rim.device.api.io.nfc.handover.ConnectionHandoverEvent
getEventType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

NO_TRANSPORT_AVAILABLE

public static final int NO_TRANSPORT_AVAILABLE
Indicates a failure occurred because the transport type is unavailable.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

HANDOVER_TIMEOUT

public static final int HANDOVER_TIMEOUT
Indicates a failure occurred because the handover process timed out.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

FATAL_NFC_SUBSYSTEM_ERROR

public static final int FATAL_NFC_SUBSYSTEM_ERROR
Indicates a failure occurred because of a fatal NFC subsystem error.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

LOCAL_TRANSPORT_UNAVAILABLE

public static final int LOCAL_TRANSPORT_UNAVAILABLE
Indicates a failure occurred because the transport was unavailable on the device.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

REMOTE_TRANSPORT_UNAVAILABLE

public static final int REMOTE_TRANSPORT_UNAVAILABLE
Indicates a failure occurred because the transport was unavailable on the partner device.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

TRANSPORT_POWERED_OFF

public static final int TRANSPORT_POWERED_OFF
Indicates a failure occurred because the transport is powered off.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

TRANSPORT_HANDOVER_CANCELED

public static final int TRANSPORT_HANDOVER_CANCELED
Indicates a failure occurred because the user cancelled the request.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

TRANSPORT_ERROR

public static final int TRANSPORT_ERROR
Indicates a failure occurred for a transport-specific reason. For example, this might occur as a result of a Bluetooth® pairing error.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0

TRANSPORT_UNKNOWN

public static final int TRANSPORT_UNKNOWN
Indicates a failure occurred for a transport-specific reason. The reason is unknown.

See Also:
Constant Field Values
Since:
BlackBerry API 7.1.0


Constructor Detail

ConnectionHandoverFailedEvent

public ConnectionHandoverFailedEvent(int eventType,
                                     int reasonFailed)
Creates a connection handover failed event.

Parameters:
eventType - One of the following:
  • ConnectionHandoverEvent.SELECTOR_TAG_READ
  • ConnectionHandoverEvent.REQUESTER_P2P_DETECTED
  • ConnectionHandoverEvent.SELECTOR_P2P_DETECTED
reasonFailed - One of the following:
  • ConnectionHandoverFailedEvent.NO_TRANSPORT_AVAILABLE
  • ConnectionHandoverFailedEvent.HANDOVER_TIMEOUT
  • ConnectionHandoverFailedEvent.FATAL_NFC_SUBSYSTEM_ERROR
Since:
BlackBerry API 7.1.0


Method Detail

getTransportReason

public int getTransportReason(int transport)
Gets the connection handover failure reason for the transport type specified.

Parameters:
transport - The transport type. Currently, the only supported transport is ConnectionHandoverEvent.BLUETOOTH_TRANSPORT.
Returns:
The connection handover failure reason. One of the following:
  • ConnectionHandoverFailedEvent.LOCAL_TRANSPORT_UNAVAILABLE
  • ConnectionHandoverFailedEvent.REMOTE_TRANSPORT_UNAVAILABLE
  • ConnectionHandoverFailedEvent.TRANSPORT_POWERED_OFF
  • ConnectionHandoverFailedEvent.TRANSPORT_HANDOVER_CANCELED
  • ConnectionHandoverFailedEvent.TRANSPORT_ERROR
  • ConnectionHandoverFailedEvent.TRANSPORT_UNKNOWN
Since:
BlackBerry API 7.1.0

getFailedReason

public int getFailedReason()
Gets the connection handover failure reason.

Returns:
The connection handover failure reason. One of the following:
  • ConnectionHandoverFailedEvent.NO_TRANSPORT_AVAILABLE
  • ConnectionHandoverFailedEvent.HANDOVER_TIMEOUT
  • ConnectionHandoverFailedEvent.FATAL_NFC_SUBSYSTEM_ERROR
Since:
BlackBerry API 7.1.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal