public static enum BondListener.Status extends java.lang.Enum<BondListener.Status> implements UsesCustomNull
BondListener.BondEvent.status()
to roughly enumerate success or failure.Enum Constant and Description |
---|
ALREADY_BONDING_OR_BONDED
Already
BleDeviceState.BONDED or in the process of BleDeviceState.BONDING . |
CANCELLED_FROM_BLE_TURNING_OFF
Cancelled from
BleManager going BleManagerState.TURNING_OFF or
BleManagerState.OFF , probably from calling BleManager.reset() . |
CANCELLED_FROM_UNBOND
A call was made to
BleDevice.unbond() at some point during the bonding process. |
FAILED_EVENTUALLY
We received a
BluetoothDevice.ACTION_BOND_STATE_CHANGED through our internal BroadcastReceiver that we went from
BleDeviceState.BONDING back to BleDeviceState.UNBONDED , which means the attempt failed. |
FAILED_IMMEDIATELY
The call to
BluetoothDevice.createBond() returned false and thus failed immediately. |
NULL
Fulfills soft contract of
UsesCustomNull . |
NULL_DEVICE
BleDevice.bond(BondListener) (or overloads) was called on BleDevice.NULL . |
SUCCESS
The
BleDevice.bond() call succeeded. |
TIMED_OUT
The bond operation took longer than the time set in
BleNodeConfig.taskTimeoutRequestFilter so we cut it loose. |
Modifier and Type | Method and Description |
---|---|
boolean |
isNull()
Returns
true if the object's state represents what would otherwise be Java's built-in null . |
static BondListener.Status |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BondListener.Status[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
boolean |
wasCancelled() |
public static final BondListener.Status NULL
UsesCustomNull
.isNull().
public static final BondListener.Status SUCCESS
BleDevice.bond()
call succeeded.public static final BondListener.Status NULL_DEVICE
BleDevice.bond(BondListener)
(or overloads) was called on BleDevice.NULL
.public static final BondListener.Status ALREADY_BONDING_OR_BONDED
BleDeviceState.BONDED
or in the process of BleDeviceState.BONDING
.public static final BondListener.Status FAILED_IMMEDIATELY
BluetoothDevice.createBond()
returned false
and thus failed immediately.public static final BondListener.Status FAILED_EVENTUALLY
BluetoothDevice.ACTION_BOND_STATE_CHANGED
through our internal BroadcastReceiver
that we went from
BleDeviceState.BONDING
back to BleDeviceState.UNBONDED
, which means the attempt failed.
See BondListener.BondEvent.failReason()
for more information.public static final BondListener.Status TIMED_OUT
BleNodeConfig.taskTimeoutRequestFilter
so we cut it loose.public static final BondListener.Status CANCELLED_FROM_UNBOND
BleDevice.unbond()
at some point during the bonding process.public static final BondListener.Status CANCELLED_FROM_BLE_TURNING_OFF
BleManager
going BleManagerState.TURNING_OFF
or
BleManagerState.OFF
, probably from calling BleManager.reset()
.public static BondListener.Status[] values()
for (BondListener.Status c : BondListener.Status.values()) System.out.println(c);
public static BondListener.Status valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic final boolean wasCancelled()
true
for CANCELLED_FROM_BLE_TURNING_OFF
or CANCELLED_FROM_UNBOND
.public final boolean isNull()
UsesCustomNull
true
if the object's state represents what would otherwise be Java's built-in null
.isNull
in interface UsesCustomNull
true
if this
== NULL
.