public static class ServerReconnectFilter.ConnectFailEvent extends ReconnectFilter.ConnectFailEvent implements UsesCustomNull
ReconnectFilter.onConnectFailed(ReconnectFilter.ConnectFailEvent)
to provide more info about how/why the connection failed.Modifier and Type | Method and Description |
---|---|
ServerReconnectFilter.ConnectFailEvent[] |
history()
Returns a chronologically-ordered list of all
ServerReconnectFilter.ConnectFailEvent instances returned through
ReconnectFilter.onConnectFailed(ReconnectFilter.ConnectFailEvent) since the first call to BleDevice.connect() ,
including the current instance. |
boolean |
isNull()
Returns whether this
ServerReconnectFilter.ConnectFailEvent instance is a "dummy" value. |
java.lang.String |
macAddress()
Returns the mac address of the client that's undergoing the state change with this
server() . |
android.bluetooth.BluetoothDevice |
nativeDevice()
The native
BluetoothDevice client this ServerReconnectFilter.ConnectFailEvent is for. |
BleServer |
server()
The
BleServer this ServerReconnectFilter.ConnectFailEvent is for. |
boolean |
shouldBeReportedToUser()
Forwards
DeviceReconnectFilter.Status.shouldBeReportedToUser()
using status() . |
ServerReconnectFilter.Status |
status()
General reason why the connection failed.
|
java.lang.String |
toString() |
attemptTime_latest, attemptTime_total, autoConnectUsage, failureCountSoFar, gattStatus
public final BleServer server()
BleServer
this ServerReconnectFilter.ConnectFailEvent
is for.public final android.bluetooth.BluetoothDevice nativeDevice()
BluetoothDevice
client this ServerReconnectFilter.ConnectFailEvent
is for.public final java.lang.String macAddress()
server()
.public final ServerReconnectFilter.Status status()
public final ServerReconnectFilter.ConnectFailEvent[] history()
ServerReconnectFilter.ConnectFailEvent
instances returned through
ReconnectFilter.onConnectFailed(ReconnectFilter.ConnectFailEvent)
since the first call to BleDevice.connect()
,
including the current instance. Thus this list will always have at least a length of one (except if isNull()
is true
).
The list length is "reset" back to one whenever a BleDeviceState.CONNECTING_OVERALL
operation completes, either
through becoming BleDeviceState.INITIALIZED
, or BleDeviceState.BLE_DISCONNECTED
for good.public final boolean isNull()
ServerReconnectFilter.ConnectFailEvent
instance is a "dummy" value. For now used for
ReconnectFilter.ConnectionLostEvent.connectionFailEvent()
in certain situations.isNull
in interface UsesCustomNull
public final boolean shouldBeReportedToUser()
DeviceReconnectFilter.Status.shouldBeReportedToUser()
using status()
.public final java.lang.String toString()
toString
in class java.lang.Object