|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.io.IOException | +--javax.bluetooth.BluetoothConnectionException
This BluetoothConnectionException
is thrown when
a Bluetooth connection (L2CAP, RFCOMM, or OBEX over RFCOMM)
cannot be established
successfully. The fields in this exception class indicate the cause of
the exception.
For example, an L2CAP connection may fail due to a security problem.
This reason is passed on to the application through this class.
Field Summary | |
static int |
FAILED_NOINFO
Indicates the connection to the server failed due to unknown reasons. |
static int |
NO_RESOURCES
Indicates the connection failed due to a lack of resources either on the local device or on the remote device. |
static int |
SECURITY_BLOCK
Indicates the connection failed because the security settings on the local device or the remote device were incompatible with the request. |
static int |
TIMEOUT
Indicates the connection to the server failed due to a timeout. |
static int |
UNACCEPTABLE_PARAMS
Indicates the connection failed because the configuration parameters provided were not acceptable to either the remote device or the local device. |
static int |
UNKNOWN_PSM
Indicates the connection to the server failed because no service for the given PSM was registered. |
Constructor Summary | |
BluetoothConnectionException(int error)
Creates a new BluetoothConnectionException
with the error indicator specified. |
|
BluetoothConnectionException(int error,
java.lang.String msg)
Creates a new BluetoothConnectionException
with the error indicator and message specified. |
Method Summary | |
int |
getStatus()
Gets the status set in the constructor that will indicate the reason for the exception. |
Methods inherited from class java.lang.Throwable |
getMessage,
printStackTrace,
toString |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int UNKNOWN_PSM
The value for UNKNOWN_PSM
is 0x0001 (1).
public static final int SECURITY_BLOCK
The value for SECURITY_BLOCK
is 0x0002 (2).
public static final int NO_RESOURCES
The value for NO_RESOURCES
is 0x0003 (3).
public static final int FAILED_NOINFO
The value for FAILED_NOINFO
is 0x0004 (4).
public static final int TIMEOUT
The value for TIMEOUT
is 0x0005 (5).
public static final int UNACCEPTABLE_PARAMS
The value for UNACCEPTABLE_PARAMS
is 0x0006 (6).
Constructor Detail |
public BluetoothConnectionException(int error)
BluetoothConnectionException
with the error indicator specified.error
- indicates the exception condition; must be one of the
constants described in this classpublic BluetoothConnectionException(int error, java.lang.String msg)
BluetoothConnectionException
with the error indicator and message specified.error
- indicates the exception condition; must be one of the
constants described in this classmsg
- a description of the exception; may by null
Method Detail |
public int getStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |