Interface BleBackend
- All Known Implementing Classes:
HelperBleBackend
public interface BleBackend
The pluggable BLE engine seam. The simulator ships its own
SimulatorBleBackend; the real-radio HelperBleBackend
drives the host machine's adapter through the bundled
cn1-ble-helper process. Ports swap engines behind this interface.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceObserves adapter state transitions of this backend.static interfaceReceives the sightings of the single platform scan. -
Method Summary
Modifier and TypeMethodDescriptiongetConnectedPeripherals(BluetoothUuid serviceFilter) getName()A stable identifier, e.g.getPeripheral(String address) The canonical peripheral at the address, ornull.booleanbooleanbooleanbooleanopenGattServer(GattServerListener listener) openL2capServer(boolean secure) voidRegisters the single adapter-state observer (the port owner).voidshutdown()Releases backend resources when it is switched away.startAdvertising(AdvertiseSettings settings, AdvertiseData data, AdvertiseData scanResponse) voidstartScan(BleBackend.ScanSink sink) Starts the single platform scan; sightings flow into the sink.voidstopScan()Stops the platform scan.
-
Method Details
-
getName
String getName()A stable identifier, e.g."simulator"or"native". -
isLeSupported
boolean isLeSupported() -
isPeripheralModeSupported
boolean isPeripheralModeSupported() -
isClassicSupported
boolean isClassicSupported() -
isL2capSupported
boolean isL2capSupported() -
getAdapterState
AdapterState getAdapterState() -
setAdapterStateSink
Registers the single adapter-state observer (the port owner). -
startScan
Starts the single platform scan; sightings flow into the sink. -
stopScan
void stopScan()Stops the platform scan. -
getPeripheral
The canonical peripheral at the address, ornull. -
getConnectedPeripherals
-
getBondedPeripherals
List<BlePeripheral> getBondedPeripherals() -
openGattServer
-
startAdvertising
AsyncResource<BleAdvertisement> startAdvertising(AdvertiseSettings settings, AdvertiseData data, AdvertiseData scanResponse) -
openL2capServer
-
shutdown
void shutdown()Releases backend resources when it is switched away.
-