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()
IBlaubotConnectorgetSupportedAcceptorTypes in interface IBlaubotConnectorpublic IBlaubotAdapter getAdapter()
IBlaubotConnectorgetAdapter in interface IBlaubotConnectorpublic void setBeaconStore(IBlaubotBeaconStore beaconStore)
IBlaubotConnectorsetBeaconStore in interface IBlaubotConnectorbeaconStore - the beacon store implementationpublic void setIncomingConnectionListener(IBlaubotIncomingConnectionListener incomingConnectionListener)
IBlaubotConnectorsetIncomingConnectionListener in interface IBlaubotConnectorincomingConnectionListener - the listener instancepublic IBlaubotConnection connectToBlaubotDevice(IBlaubotDevice blaubotDevice)
IBlaubotConnectorIBlaubotDevice.connectToBlaubotDevice in interface IBlaubotConnectorblaubotDevice - the device to connect to