public static class DeviceConnectListener.ConnectEvent extends Event
Modifier and Type | Method and Description |
---|---|
BleDevice |
device() |
DeviceReconnectFilter.ConnectFailEvent |
failEvent()
Returns the
DeviceReconnectFilter.ConnectFailEvent instance. |
boolean |
isRetrying()
Returns
true if the library will be retrying the connection after this failure. |
boolean |
wasSuccess()
Returns
true if a connection was established to the device() . |
public final BleDevice device()
public final DeviceReconnectFilter.ConnectFailEvent failEvent()
DeviceReconnectFilter.ConnectFailEvent
instance. While this should never return
null
, the event can "be" null. Call DeviceReconnectFilter.ConnectFailEvent.isNull()
to check. If that reports
true
, it means the connection was successful, thus no real fail event.public final boolean wasSuccess()
true
if a connection was established to the device()
. At this point, the device is connected,
and in the BleDeviceState.INITIALIZED
state. If this returns false
, you can retrieve failure information
by calling failEvent()
.public final boolean isRetrying()
true
if the library will be retrying the connection after this failure.