use of org.eclipse.smarthome.binding.bluetooth.BluetoothDiscoveryListener in project smarthome by eclipse.
the class BluetoothDiscoveryService method addBluetoothAdapter.
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)
protected void addBluetoothAdapter(BluetoothAdapter adapter) {
this.adapters.add(adapter);
BluetoothDiscoveryListener listener = new BluetoothDiscoveryListener() {
@Override
public void deviceDiscovered(BluetoothDevice device) {
BluetoothDiscoveryService.this.deviceDiscovered(adapter, device);
}
};
adapter.addDiscoveryListener(listener);
registeredListeners.put(adapter.getUID(), listener);
}
Aggregations