public interface ReconnectFilter<T extends ReconnectFilter.ConnectFailEvent>
BleNodeConfig.reconnectFilter
to control reconnection behavior.Modifier and Type | Interface and Description |
---|---|
static class |
ReconnectFilter.AutoConnectUsage
Describes usage of the
autoConnect parameter for either BluetoothDevice.connectGatt(Context, boolean, android.bluetooth.BluetoothGattCallback)
or BluetoothGattServer.connect(BluetoothDevice, boolean) . |
static class |
ReconnectFilter.ConnectFailEvent
Abstract base class for structures passed to
onConnectFailed(ConnectFailEvent)
and onConnectFailed(ConnectFailEvent) to provide more info about how/why a connection failed. |
static class |
ReconnectFilter.ConnectFailPlease
Return value for
onConnectFailed(ConnectFailEvent)
and onConnectFailed(ConnectFailEvent) . |
static class |
ReconnectFilter.ConnectionLostEvent
Struct passed to
onConnectionLost(ConnectionLostEvent) to aid in making a decision. |
static class |
ReconnectFilter.ConnectionLostPlease
Return value for
onConnectionLost(ConnectionLostEvent) . |
static class |
ReconnectFilter.DefaultNullReconnectFilter |
static class |
ReconnectFilter.Type
An enum provided through
ReconnectFilter.ConnectionLostEvent.type() that describes what reconnect stage we're at. |
Modifier and Type | Method and Description |
---|---|
ReconnectFilter.ConnectFailPlease |
onConnectFailed(T event)
This is called when connecting to a previously unconnected device fails.
|
ReconnectFilter.ConnectionLostPlease |
onConnectionLost(ReconnectFilter.ConnectionLostEvent event)
This is called when a connected device loses it's connection, outside of you calling
BleDevice.disconnect() |
ReconnectFilter.ConnectFailPlease onConnectFailed(T event)
ReconnectFilter.ConnectFailPlease
as return values to either
retry, or stop retrying to connect.ReconnectFilter.ConnectionLostPlease onConnectionLost(ReconnectFilter.ConnectionLostEvent event)
BleDevice.disconnect()