Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Classes | Static Public Member Functions | Static Public Attributes | List of all members
org.direct_bt.BTFactory Class Reference

One stop BTManager API entry point. More...

Collaboration diagram for org.direct_bt.BTFactory:

Classes

class  ImplementationIdentifier
 Identifier names, allowing BTFactory#getBTManager(ImplementationIdentifier) to initialize the required native libraries and to instantiate the root BTManager instance. More...
 

Static Public Member Functions

static final String getAPIVersion ()
 Manifest's Attributes.Name#SPECIFICATION_VERSION or. More...
 
static final String getImplVersion ()
 Manifest's Attributes.Name#IMPLEMENTATION_VERSION or. More...
 
static synchronized void checkInitialized ()
 
static synchronized boolean isInitialized ()
 
static synchronized boolean registerImplementationIdentifier (final ImplementationIdentifier id)
 Registers a new ImplementationIdentifier to the internal list. More...
 
static synchronized ImplementationIdentifier getImplementationIdentifier (final String fqBluetoothManagerImplementationClassName)
 Returns the matching ImplementationIdentifier from the internal list or. More...
 
static synchronized BTManager getBTManager (final String fqBluetoothManagerImplementationClassName) throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
 Returns an initialized BluetoothManager instance using the given. More...
 
static synchronized BTManager getBTManager (final ImplementationIdentifier id) throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
 Returns an initialized BluetoothManager instance using the given ImplementationIdentifier. More...
 
static synchronized BTManager getDirectBTManager () throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
 Returns an initialized BluetoothManager instance using the DirectBT implementation. More...
 
static void main (final String args[])
 
static native String getNativeVersion ()
 
static native String getNativeAPIVersion ()
 

Static Public Attributes

static final ImplementationIdentifier DirectBTImplementationID = new ImplementationIdentifier("jau.direct_bt.DBTManager", "direct_bt", "javadirect_bt")
 ImplementationIdentifier for direct_bt implementation: {@value} More...
 
static final boolean VERBOSE
 Verbose logging enabled or disabled. More...
 
static final boolean DEBUG
 Debug logging enabled or disabled. More...
 
static final BTMode DEFAULT_BTMODE
 Default BTMode when initializing new adapter. More...
 
static final boolean JAULIB_AVAILABLE
 True if jaulib org.jau.sys.PlatformProps has been detected. More...
 
static final boolean JAULIB_JARCACHE_USED
 True if jaulib JAULIB_AVAILABLE and its org.jau.sys.PlatformProps#USE_TEMP_JAR_CACHE is true, i.e. More...
 

Detailed Description

One stop BTManager API entry point.

Further provides access to certain property settings, see DEBUG, VERBOSE, DEFAULT_BTMODE and BTManager.Settings.

Definition at line 52 of file BTFactory.java.

Member Function Documentation

◆ checkInitialized()

static synchronized void org.direct_bt.BTFactory.checkInitialized ( )
static

Definition at line 215 of file BTFactory.java.

◆ getAPIVersion()

static final String org.direct_bt.BTFactory.getAPIVersion ( )
static

Manifest's Attributes.Name#SPECIFICATION_VERSION or.

null

if not available.

Definition at line 124 of file BTFactory.java.

Here is the caller graph for this function:

◆ getBTManager() [1/2]

static synchronized BTManager org.direct_bt.BTFactory.getBTManager ( final ImplementationIdentifier  id) throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
static

Returns an initialized BluetoothManager instance using the given ImplementationIdentifier.

If the ImplementationIdentifier has not been registerImplementationIdentifier(ImplementationIdentifier), it will be added to the list.

The chosen implementation can't be changed within a running implementation, an exception is thrown if tried.

Parameters
idthe specific ImplementationIdentifier
Exceptions
BTException
NoSuchMethodException
SecurityException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
ClassNotFoundException
See also
DBusFactoryImplClassName
DirectBTFactoryImplClassName

Definition at line 454 of file BTFactory.java.

Here is the call graph for this function:

◆ getBTManager() [2/2]

static synchronized BTManager org.direct_bt.BTFactory.getBTManager ( final String  fqBluetoothManagerImplementationClassName) throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
static

Returns an initialized BluetoothManager instance using the given.

fqBluetoothManagerImplementationClassName

to lookup a registered ImplementationIdentifier.

If found, method returns getBTManager(ImplementationIdentifier), otherwise

null

.

The chosen implementation can't be changed within a running implementation, an exception is thrown if tried.

Parameters
fqBluetoothManagerImplementationClassNamefully qualified class name for the BTManager implementation
Exceptions
BTException
NoSuchMethodException
SecurityException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
ClassNotFoundException
See also
DBusFactoryImplClassName
DirectBTFactoryImplClassName

Definition at line 423 of file BTFactory.java.

Here is the call graph for this function:

◆ getDirectBTManager()

static synchronized BTManager org.direct_bt.BTFactory.getDirectBTManager ( ) throws BTException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, ClassNotFoundException
static

Returns an initialized BluetoothManager instance using the DirectBT implementation.

Issues getBTManager(ImplementationIdentifier) using DirectBTImplementationID.

The chosen implementation can't be changed within a running implementation, an exception is thrown if tried.

Exceptions
BTException
NoSuchMethodException
SecurityException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
ClassNotFoundException

Definition at line 480 of file BTFactory.java.

Here is the caller graph for this function:

◆ getImplementationIdentifier()

static synchronized ImplementationIdentifier org.direct_bt.BTFactory.getImplementationIdentifier ( final String  fqBluetoothManagerImplementationClassName)
static

Returns the matching ImplementationIdentifier from the internal list or.

null

if not found.

Parameters
fqBluetoothManagerImplementationClassNamefully qualified class name for the BTManager implementation

Definition at line 393 of file BTFactory.java.

Here is the caller graph for this function:

◆ getImplVersion()

static final String org.direct_bt.BTFactory.getImplVersion ( )
static

Manifest's Attributes.Name#IMPLEMENTATION_VERSION or.

null

if not available.

Definition at line 130 of file BTFactory.java.

Here is the caller graph for this function:

◆ getNativeAPIVersion()

static native String org.direct_bt.BTFactory.getNativeAPIVersion ( )
static
Here is the caller graph for this function:

◆ getNativeVersion()

static native String org.direct_bt.BTFactory.getNativeVersion ( )
static
Here is the caller graph for this function:

◆ isInitialized()

static synchronized boolean org.direct_bt.BTFactory.isInitialized ( )
static

Definition at line 220 of file BTFactory.java.

◆ main()

static void org.direct_bt.BTFactory.main ( final String  args[])
static

Definition at line 530 of file BTFactory.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerImplementationIdentifier()

static synchronized boolean org.direct_bt.BTFactory.registerImplementationIdentifier ( final ImplementationIdentifier  id)
static

Registers a new ImplementationIdentifier to the internal list.

The

id

is only added if not registered yet.

Parameters
idthe ImplementationIdentifier to register
Returns
true
if the given ImplementationIdentifier has been newly added, otherwise
false
.

Definition at line 379 of file BTFactory.java.

Here is the caller graph for this function:

Member Data Documentation

◆ DEBUG

final boolean org.direct_bt.BTFactory.DEBUG
static

Debug logging enabled or disabled.

System property

org.direct_bt.debug

, boolean, default

false

.

Definition at line 147 of file BTFactory.java.

◆ DEFAULT_BTMODE

final BTMode org.direct_bt.BTFactory.DEFAULT_BTMODE
static

Default BTMode when initializing new adapter.

System property

org.direct_bt.btmode

, string, default

DUAL

BTMode#DUAL.

Since
2.0.0

Definition at line 156 of file BTFactory.java.

◆ DirectBTImplementationID

final ImplementationIdentifier org.direct_bt.BTFactory.DirectBTImplementationID = new ImplementationIdentifier("jau.direct_bt.DBTManager", "direct_bt", "javadirect_bt")
static

ImplementationIdentifier for direct_bt implementation: {@value}

This value is exposed for convenience, user implementations are welcome.

Definition at line 117 of file BTFactory.java.

◆ JAULIB_AVAILABLE

final boolean org.direct_bt.BTFactory.JAULIB_AVAILABLE
static

True if jaulib org.jau.sys.PlatformProps has been detected.

Definition at line 161 of file BTFactory.java.

◆ JAULIB_JARCACHE_USED

final boolean org.direct_bt.BTFactory.JAULIB_JARCACHE_USED
static

True if jaulib JAULIB_AVAILABLE and its org.jau.sys.PlatformProps#USE_TEMP_JAR_CACHE is true, i.e.

the jar cache is available, enabled and in use.

Definition at line 167 of file BTFactory.java.

◆ VERBOSE

final boolean org.direct_bt.BTFactory.VERBOSE
static

Verbose logging enabled or disabled.

System property

org.direct_bt.verbose

, boolean, default

false

.

Definition at line 139 of file BTFactory.java.


The documentation for this class was generated from the following file:
org.direct_bt
Author: Sven Gothel sgothel@jausoft.com Copyright (c) 2020 Gothel Software e.K.
org