@ProviderType
public interface BluetoothLeAdapter
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.Future<BluetoothLeDevice> |
findDeviceByAddress(long timeout,
java.lang.String address)
Search for a BLE device with the specified address.
|
void |
findDeviceByAddress(long timeout,
java.lang.String address,
java.util.function.Consumer<BluetoothLeDevice> consumer)
Search for a BLE device with the specified address.
|
java.util.concurrent.Future<BluetoothLeDevice> |
findDeviceByName(long timeout,
java.lang.String name)
Search for a BLE device with the specified name.
|
void |
findDeviceByName(long timeout,
java.lang.String name,
java.util.function.Consumer<BluetoothLeDevice> consumer)
Search for a BLE device with the specified name.
|
java.util.concurrent.Future<java.util.List<BluetoothLeDevice>> |
findDevices(long timeout)
Search for BLE devices.
|
void |
findDevices(long timeout,
java.util.function.Consumer<java.util.List<BluetoothLeDevice>> consumer)
Search for BLE devices.
|
java.lang.String |
getAddress()
Returns the hardware address of this adapter.
|
java.lang.String |
getAlias()
Returns the friendly name of this adapter.
|
long |
getBluetoothClass()
Returns the Bluetooth class of the adapter.
|
long |
getDiscoverableTimeout()
Returns the discoverable timeout the adapter.
|
java.lang.String |
getInterfaceName()
Returns the interface name of this adapter.
|
java.lang.String |
getModalias()
Returns the local ID of the adapter.
|
java.lang.String |
getName()
Returns the system name of this adapter.
|
long |
getPairableTimeout()
Returns the timeout in seconds after which pairable state turns off
automatically, 0 means never.
|
java.util.UUID[] |
getUUIDs()
Returns the UUIDs of the adapter.
|
boolean |
isDiscoverable()
Returns the discoverable state the adapter.
|
boolean |
isDiscovering()
Returns the discovering state the adapter.
|
boolean |
isPairable()
Returns the pairable state the adapter.
|
boolean |
isPowered()
Returns the power state the adapter.
|
void |
setAlias(java.lang.String value)
Sets the friendly name of this adapter.
|
void |
setDiscoverable(boolean value)
Sets the discoverable state the adapter.
|
void |
setDiscoverableTimout(long value)
Sets the discoverable timeout the adapter.
|
void |
setPairable(boolean value)
Sets the discoverable state the adapter.
|
void |
setPairableTimeout(long value)
Sets the timeout after which pairable state turns off automatically, 0 means never.
|
void |
setPowered(boolean value)
Sets the power state the adapter.
|
void |
stopDiscovery()
Stops a BLE discovery.
|
java.util.concurrent.Future<BluetoothLeDevice> findDeviceByAddress(long timeout, java.lang.String address)
timeout
- timeout in seconds for device discoveryaddress
- MAC address of the BLE devicejava.util.concurrent.Future<BluetoothLeDevice> findDeviceByName(long timeout, java.lang.String name)
timeout
- timeout in seconds for device discoveryname
- system name of the BLE devicevoid findDeviceByAddress(long timeout, java.lang.String address, java.util.function.Consumer<BluetoothLeDevice> consumer)
timeout
- timeout in seconds for device discoveryaddress
- MAC address of the BLE deviceconsumer
- the consumer used to get the devicevoid findDeviceByName(long timeout, java.lang.String name, java.util.function.Consumer<BluetoothLeDevice> consumer)
timeout
- timeout in seconds for device discoveryname
- system name of the BLE deviceconsumer
- the consumer used to get the devicejava.util.concurrent.Future<java.util.List<BluetoothLeDevice>> findDevices(long timeout)
timeout
- timeout in seconds for device discoveryvoid findDevices(long timeout, java.util.function.Consumer<java.util.List<BluetoothLeDevice>> consumer)
timeout
- timeout in seconds for device discoveryconsumer
- the consumer used to get the devicevoid stopDiscovery() throws KuraBluetoothDiscoveryException
KuraBluetoothDiscoveryException
java.lang.String getAddress()
java.lang.String getName()
java.lang.String getInterfaceName()
java.lang.String getModalias()
java.lang.String getAlias()
void setAlias(java.lang.String value)
long getBluetoothClass()
boolean isPowered()
void setPowered(boolean value)
boolean isDiscoverable()
void setDiscoverable(boolean value)
long getDiscoverableTimeout()
void setDiscoverableTimout(long value)
boolean isPairable()
void setPairable(boolean value)
long getPairableTimeout()
void setPairableTimeout(long value)
boolean isDiscovering()
java.util.UUID[] getUUIDs()