Space
- Space type parameter which the discovered devices belong toDevice
- Bluetooth device type parameterpublic abstract class AbstractBluetoothDeviceDiscoverer<Space,Device extends RemoteBluetoothDevice> extends java.lang.Object implements BluetoothDeviceDiscoverer
Modifier and Type | Field and Description |
---|---|
protected boolean |
isNonConnectableModeSupported |
protected static boolean |
PROFILE_RECOGNIZED_FILTERING_NOT_PASSED |
protected static boolean |
PROFILE_RECOGNIZED_NO_BELONGING_SPACE_FOUND |
protected static boolean |
PROFILE_UNRECOGNIZED |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBluetoothDeviceDiscoverer(DiscoveryContract discoveryContract,
ActivityCheckConfiguration activityCheckConfiguration,
java.util.Collection<Space> spaceSet,
long deviceUpdateCallbackInterval,
boolean isNonConnectableModeSupported) |
Modifier and Type | Method and Description |
---|---|
void |
clearResources()
Clears resources.
|
protected abstract BluetoothDeviceEvent |
createEvent(EventType eventType,
Space space,
java.util.List<Device> deviceList) |
void |
evictInactiveDevices(long currentTimeMillis)
Evicts inactive devices.
|
protected ReplacingArrayList<Device> |
getDevicesInSpace(Space space) |
protected java.util.Collection<Space> |
getSpaceSet() |
protected void |
insertDevicesIntoSpace(Space space,
ReplacingArrayList<Device> deviceList) |
protected void |
notifyDevicePresent(int deviceAddressHashcode,
long timestamp) |
protected void |
notifySpacePresent(int spaceHashcode,
long timestamp) |
protected abstract void |
onBeforeDeviceLost(Device device) |
protected void |
onDeviceDiscoveredEvent(Space space,
Device device) |
protected void |
onDeviceLostEvent(Space space,
Device device) |
protected void |
onDevicesUpdatedEvent(Space space,
java.util.Collection<Device> deviceList) |
protected void |
onSpaceAbandonedEvent(Space space) |
protected void |
onSpaceEnteredEvent(Space space) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disable, performDiscovery
protected static boolean PROFILE_UNRECOGNIZED
protected static boolean PROFILE_RECOGNIZED_FILTERING_NOT_PASSED
protected static boolean PROFILE_RECOGNIZED_NO_BELONGING_SPACE_FOUND
protected final boolean isNonConnectableModeSupported
protected AbstractBluetoothDeviceDiscoverer(DiscoveryContract discoveryContract, ActivityCheckConfiguration activityCheckConfiguration, java.util.Collection<Space> spaceSet, long deviceUpdateCallbackInterval, boolean isNonConnectableModeSupported)
protected abstract BluetoothDeviceEvent createEvent(EventType eventType, Space space, java.util.List<Device> deviceList)
protected abstract void onBeforeDeviceLost(Device device)
public void clearResources()
BluetoothDeviceDiscoverer
clearResources
in interface BluetoothDeviceDiscoverer
protected void notifyDevicePresent(int deviceAddressHashcode, long timestamp)
protected void notifySpacePresent(int spaceHashcode, long timestamp)
protected java.util.Collection<Space> getSpaceSet()
protected ReplacingArrayList<Device> getDevicesInSpace(Space space)
protected void insertDevicesIntoSpace(Space space, ReplacingArrayList<Device> deviceList)
protected void onSpaceEnteredEvent(Space space)
protected void onDevicesUpdatedEvent(Space space, java.util.Collection<Device> deviceList)
protected void onSpaceAbandonedEvent(Space space)
public void evictInactiveDevices(long currentTimeMillis)
BluetoothDeviceDiscoverer
ActivityCheckConfiguration.getInactivityTimeout()
evictInactiveDevices
in interface BluetoothDeviceDiscoverer
currentTimeMillis
- current system time millis