Space
- Space type parameter which the discovered devices belong toRBD
- Bluetooth device type parameterpublic abstract class AbstractBluetoothDeviceDiscoverer<Space,RBD extends RemoteBluetoothDevice> extends java.lang.Object implements BluetoothDeviceDiscoverer
Modifier and Type | Field and Description |
---|---|
protected static boolean |
PROFILE_RECOGNIZED_DEVICE_NOT_READY |
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,
DistanceSort distanceSort,
java.util.Collection<EventType> eventTypes,
ActivityCheckConfiguration activityCheckConfiguration,
java.util.Collection<Space> spaceSet,
long deviceUpdateCallbackInterval) |
Modifier and Type | Method and Description |
---|---|
void |
clearResources()
Clears resources.
|
protected abstract BluetoothDeviceEvent |
createEvent(EventType eventType,
Space space,
java.util.ArrayList<RBD> deviceList) |
void |
evictInactiveDevices()
Evicts inactive devices.
|
protected ReplacingArrayList<RBD> |
getDevicesInSpace(Space space) |
protected java.util.Collection<Space> |
getSpaceSet() |
protected void |
insertDevicesIntoSpace(Space space,
ReplacingArrayList<RBD> deviceList) |
protected void |
notifySpacePresent(int spaceHashcode,
long timestamp) |
protected abstract void |
onBeforeDeviceLost(RBD device) |
protected void |
onDeviceDiscoveredEvent(Space space,
RBD device) |
protected void |
onDeviceLostEvent(Space space,
RBD device) |
protected void |
onDevicesUpdatedEvent(Space space,
java.util.Collection<RBD> deviceList) |
protected void |
onSpaceAbandonedEvent(Space space) |
protected void |
onSpaceEnteredEvent(Space space) |
protected void |
sortIfEnabled(java.util.List<RBD> deviceList) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disable, performDiscovery, reset
protected static boolean PROFILE_UNRECOGNIZED
protected static boolean PROFILE_RECOGNIZED_DEVICE_NOT_READY
protected static boolean PROFILE_RECOGNIZED_FILTERING_NOT_PASSED
protected static boolean PROFILE_RECOGNIZED_NO_BELONGING_SPACE_FOUND
protected AbstractBluetoothDeviceDiscoverer(DiscoveryContract discoveryContract, DistanceSort distanceSort, java.util.Collection<EventType> eventTypes, ActivityCheckConfiguration activityCheckConfiguration, java.util.Collection<Space> spaceSet, long deviceUpdateCallbackInterval)
protected abstract BluetoothDeviceEvent createEvent(EventType eventType, Space space, java.util.ArrayList<RBD> deviceList)
protected abstract void onBeforeDeviceLost(RBD device)
public void clearResources()
BluetoothDeviceDiscoverer
clearResources
in interface BluetoothDeviceDiscoverer
protected void sortIfEnabled(java.util.List<RBD> deviceList)
protected void notifySpacePresent(int spaceHashcode, long timestamp)
protected java.util.Collection<Space> getSpaceSet()
protected ReplacingArrayList<RBD> getDevicesInSpace(Space space)
protected void insertDevicesIntoSpace(Space space, ReplacingArrayList<RBD> deviceList)
protected void onSpaceEnteredEvent(Space space)
protected void onDevicesUpdatedEvent(Space space, java.util.Collection<RBD> deviceList)
protected void onSpaceAbandonedEvent(Space space)
public void evictInactiveDevices()
BluetoothDeviceDiscoverer
ActivityCheckConfiguration.getInactivityTimeout()
evictInactiveDevices
in interface BluetoothDeviceDiscoverer