Package io.heraldprox.herald.sensor.ble
Interface BLEDatabase
-
- All Known Implementing Classes:
ConcreteBLEDatabase
public interface BLEDatabaseRegistry for collating fragments of information from asynchronous BLE operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(BLEDatabaseDelegate delegate)Add delegate for handling database eventsvoiddelete(BLEDevice device)Delete device from database.BLEDevicedevice(android.bluetooth.BluetoothDevice bluetoothDevice)Get or create device for collating information from asynchronous BLE operations.BLEDevicedevice(android.bluetooth.le.ScanResult scanResult)Get or create device for collating information from asynchronous BLE operations.BLEDevicedevice(PayloadData payloadData)Get or create device for collating information from asynchronous BLE operations.BLEDevicedevice(TargetIdentifier targetIdentifier)Get a device from a TargetIdentifier.java.util.List<BLEDevice>devices()Get all devices.PayloadSharingDatapayloadSharingData(BLEDevice peer)Get payload sharing data for a peer.
-
-
-
Method Detail
-
add
void add(@NonNull BLEDatabaseDelegate delegate)Add delegate for handling database events- Parameters:
delegate-
-
device
@NonNull BLEDevice device(@NonNull android.bluetooth.le.ScanResult scanResult)
Get or create device for collating information from asynchronous BLE operations.- Parameters:
scanResult-- Returns:
-
device
@NonNull BLEDevice device(@NonNull android.bluetooth.BluetoothDevice bluetoothDevice)
Get or create device for collating information from asynchronous BLE operations.- Parameters:
bluetoothDevice-- Returns:
-
device
@NonNull BLEDevice device(@NonNull PayloadData payloadData)
Get or create device for collating information from asynchronous BLE operations.- Parameters:
payloadData-- Returns:
-
device
@Nullable BLEDevice device(@NonNull TargetIdentifier targetIdentifier)
Get a device from a TargetIdentifier.- Parameters:
targetIdentifier-- Returns:
-
devices
@NonNull java.util.List<BLEDevice> devices()
Get all devices.- Returns:
-
delete
void delete(@NonNull BLEDevice device)Delete device from database.- Parameters:
device-
-
payloadSharingData
@NonNull PayloadSharingData payloadSharingData(@NonNull BLEDevice peer)
Get payload sharing data for a peer.- Parameters:
peer-- Returns:
-
-