Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Public Member Functions | |
final void | addChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Add the given ChangedAdapterSetListener to this manager. More... | |
final BTAdapter | getAdapter (final int dev_id) |
Returns the BluetoothAdapter matching the given dev_id or null if not found. More... | |
final List< BTAdapter > | getAdapters () |
Returns a list of BluetoothAdapters available in the system. More... | |
final BTAdapter | getDefaultAdapter () |
Gets the default adapter to use for discovery. More... | |
int | removeAllChangedAdapterSetListener () |
Remove all added ChangedAdapterSetListener entries from this manager. More... | |
final int | removeChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Remove the given ChangedAdapterSetListener from this manager. More... | |
final boolean | setDefaultAdapter (final BTAdapter adapter) |
Sets a default adapter to use for discovery. More... | |
final void | shutdown () |
Release the native memory associated with this object and all related Bluetooth resources. More... | |
void | addChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Add the given ChangedAdapterSetListener to this manager. More... | |
BTAdapter | getAdapter (final int dev_id) |
Returns the BluetoothAdapter matching the given dev_id or null if not found. More... | |
List< BTAdapter > | getAdapters () |
Returns a list of BluetoothAdapters available in the system. More... | |
BTAdapter | getDefaultAdapter () |
Gets the default adapter to use for discovery. More... | |
int | removeAllChangedAdapterSetListener () |
Remove all added ChangedAdapterSetListener entries from this manager. More... | |
int | removeChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Remove the given ChangedAdapterSetListener from this manager. More... | |
boolean | setDefaultAdapter (BTAdapter adapter) |
Sets a default adapter to use for discovery. More... | |
void | shutdown () |
Release the native memory associated with this object and all related Bluetooth resources. More... | |
Static Public Member Functions | |
static final void | addShutdownHook (final boolean head, final Runnable runnable) |
Add a shutdown hook to be performed at JVM shutdown before shutting down DBTManager instance. More... | |
static final BTManager | getManager () throws RuntimeException, BTException |
Returns an instance of BluetoothManager, to be used instead of constructor. More... | |
static final boolean | isJVMShuttingDown () |
Returns true if the JVM is shutting down, otherwise false. More... | |
Protected Member Functions | |
final void | finalize () |
Static Protected Attributes | |
static final boolean | DEBUG = BTFactory.DEBUG |
static final boolean | VERBOSE = BTFactory.VERBOSE |
Definition at line 41 of file DBTManager.java.
|
static |
Returns true if the JVM is shutting down, otherwise false.
Definition at line 108 of file DBTManager.java.
|
static |
Add a shutdown hook to be performed at JVM shutdown before shutting down DBTManager instance.
head | if true add runnable at the start, otherwise at the end |
runnable | runnable to be added. |
Definition at line 116 of file DBTManager.java.
final List< BTAdapter > jau.direct_bt.DBTManager.getAdapters | ( | ) |
Returns a list of BluetoothAdapters available in the system.
Implements org.direct_bt.BTManager.
Definition at line 133 of file DBTManager.java.
final BTAdapter jau.direct_bt.DBTManager.getAdapter | ( | final int | dev_id | ) |
Returns the BluetoothAdapter matching the given dev_id or null if not found.
The adapters internal device id is constant across the adapter lifecycle, but may change after its destruction.
dev_id | the internal temporary adapter device id |
Implements org.direct_bt.BTManager.
Definition at line 136 of file DBTManager.java.
final boolean jau.direct_bt.DBTManager.setDefaultAdapter | ( | final BTAdapter | adapter | ) |
Sets a default adapter to use for discovery.
Implements org.direct_bt.BTManager.
Definition at line 147 of file DBTManager.java.
final BTAdapter jau.direct_bt.DBTManager.getDefaultAdapter | ( | ) |
Gets the default adapter to use for discovery.
The default adapter is either the first powered
BTAdapter
, or function returns nullptr if none is enabled.
Implements org.direct_bt.BTManager.
Definition at line 152 of file DBTManager.java.
final void jau.direct_bt.DBTManager.addChangedAdapterSetListener | ( | final ChangedAdapterSetListener | l | ) |
Add the given ChangedAdapterSetListener
to this manager.
When a new callback is added, all available adapter's will be reported as added, this allows a fully event driven workflow.
The callback is performed on a dedicated thread, allowing the user to perform complex operations.
Implements org.direct_bt.BTManager.
Definition at line 163 of file DBTManager.java.
final int jau.direct_bt.DBTManager.removeChangedAdapterSetListener | ( | final ChangedAdapterSetListener | l | ) |
Remove the given ChangedAdapterSetListener
from this manager.
l | the to be removed element |
Implements org.direct_bt.BTManager.
Definition at line 175 of file DBTManager.java.
int jau.direct_bt.DBTManager.removeAllChangedAdapterSetListener | ( | ) |
Remove all added ChangedAdapterSetListener
entries from this manager.
Implements org.direct_bt.BTManager.
Definition at line 192 of file DBTManager.java.
|
static |
Returns an instance of BluetoothManager, to be used instead of constructor.
Definition at line 304 of file DBTManager.java.
|
protected |
Definition at line 313 of file DBTManager.java.
final void jau.direct_bt.DBTManager.shutdown | ( | ) |
Release the native memory associated with this object and all related Bluetooth resources.
The object should not be used following a call to close
Shutdown method is intended to allow a clean Bluetooth state at program exist.
Implements org.direct_bt.BTManager.
Definition at line 318 of file DBTManager.java.
|
staticprotected |
Definition at line 43 of file DBTManager.java.
|
staticprotected |
Definition at line 44 of file DBTManager.java.