public class BlaubotJsr82BluetoothConnector extends java.lang.Object implements IBlaubotConnector
Modifier and Type | Field and Description |
---|---|
static long |
SERVICE_SEARCH_TIMEOUT
max ms to for a complete device and service inquiry before we stop
|
Constructor and Description |
---|
BlaubotJsr82BluetoothConnector(BlaubotJsr82BluetoothAdapter blaubotBluetoothAdapter,
IBlaubotDevice ownDevice) |
Modifier and Type | Method and Description |
---|---|
IBlaubotConnection |
connectToBlaubotDevice(IBlaubotDevice blaubotDevice)
Try to connect to the given
IBlaubotDevice . |
IBlaubotAdapter |
getAdapter()
Get the adapter of which this connector is part of.
|
java.util.List<java.lang.String> |
getSupportedAcceptorTypes()
Returns a list of supported acceptors to connect to.
|
void |
setBeaconStore(IBlaubotBeaconStore beaconStore)
Setter method for the dependency injection of a beacon store.
|
void |
setIncomingConnectionListener(IBlaubotIncomingConnectionListener incomingConnectionListener)
Setter method for a callback that will be triggered when this
connector successfully established a connection to a remote device.
|
public static final long SERVICE_SEARCH_TIMEOUT
public BlaubotJsr82BluetoothConnector(BlaubotJsr82BluetoothAdapter blaubotBluetoothAdapter, IBlaubotDevice ownDevice) throws javax.bluetooth.BluetoothStateException
blaubotBluetoothAdapter
- the adapterownDevice
- our own device containing our own device idjavax.bluetooth.BluetoothStateException
- if we cannot access or detect the bluetooth stack or query the hardwarepublic java.util.List<java.lang.String> getSupportedAcceptorTypes()
IBlaubotConnector
getSupportedAcceptorTypes
in interface IBlaubotConnector
public IBlaubotAdapter getAdapter()
IBlaubotConnector
getAdapter
in interface IBlaubotConnector
public void setBeaconStore(IBlaubotBeaconStore beaconStore)
IBlaubotConnector
setBeaconStore
in interface IBlaubotConnector
beaconStore
- the beacon store implementationpublic void setIncomingConnectionListener(IBlaubotIncomingConnectionListener incomingConnectionListener)
IBlaubotConnector
setIncomingConnectionListener
in interface IBlaubotConnector
incomingConnectionListener
- the listener instancepublic IBlaubotConnection connectToBlaubotDevice(IBlaubotDevice blaubotDevice)
IBlaubotConnector
IBlaubotDevice
.connectToBlaubotDevice
in interface IBlaubotConnector
blaubotDevice
- the device to connect to