Package io.heraldprox.herald.sensor.ble
Interface BLEDatabase
-
- All Known Implementing Classes:
ConcreteBLEDatabase
public interface BLEDatabase
Registry for collating fragments of information from asynchronous BLE operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(BLEDatabaseDelegate delegate)
Add delegate for handling database eventsvoid
delete(BLEDevice device)
Delete device from database.BLEDevice
device(android.bluetooth.BluetoothDevice bluetoothDevice)
Get or create device for collating information from asynchronous BLE operations.BLEDevice
device(android.bluetooth.le.ScanResult scanResult)
Get or create device for collating information from asynchronous BLE operations.BLEDevice
device(PayloadData payloadData)
Get or create device for collating information from asynchronous BLE operations.BLEDevice
device(TargetIdentifier targetIdentifier)
Get a device from a TargetIdentifier.java.util.List<BLEDevice>
devices()
Get all devices.PayloadSharingData
payloadSharingData(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:
-
-