public class BlaubotBluetoothConnectionAcceptor extends java.lang.Object implements IBlaubotConnectionAcceptor
Modifier and Type | Class and Description |
---|---|
class |
BlaubotBluetoothConnectionAcceptor.BluetoothAcceptThread
Handles initial BlauBot instance communication.
|
Constructor and Description |
---|
BlaubotBluetoothConnectionAcceptor(BlaubotBluetoothAdapter blaubotBluetoothAdapter) |
Modifier and Type | Method and Description |
---|---|
IBlaubotAdapter |
getAdapter()
Get the adapter of which this acceptor is part of.
|
ConnectionMetaDataDTO |
getConnectionMetaData()
Get the connection meta data needed to connect to this connector
This infos can range from mac addresses over ip addresses to port numbers.
|
boolean |
isStarted()
Retrieves the started state of this acceptor.
|
void |
setAcceptorListener(IBlaubotIncomingConnectionListener acceptorListener)
Sets a listener that receives callbacks whenever a connection was accepted by the acceptor.
|
void |
setBeaconStore(IBlaubotBeaconStore beaconStore)
Dependency injecton for the BeaconStore.
|
void |
setListeningStateListener(IBlaubotListeningStateListener stateListener)
Sets a listener that receives callbacks, when the acceptor started accepting connections (is listening).
|
void |
startListening()
Starts the connection acceptor.
|
void |
stopListening()
Stops a running acceptor.
|
public BlaubotBluetoothConnectionAcceptor(BlaubotBluetoothAdapter blaubotBluetoothAdapter)
public IBlaubotAdapter getAdapter()
IBlaubotConnectionAcceptor
getAdapter
in interface IBlaubotConnectionAcceptor
public void setBeaconStore(IBlaubotBeaconStore beaconStore)
IBlaubotConnectionAcceptor
setBeaconStore
in interface IBlaubotConnectionAcceptor
beaconStore
- the beaconStorepublic void startListening()
IBlaubotConnectionAcceptor
startListening
in interface IBlaubotConnectionAcceptor
public void stopListening()
IBlaubotConnectionAcceptor
stopListening
in interface IBlaubotConnectionAcceptor
public void setListeningStateListener(IBlaubotListeningStateListener stateListener)
IBlaubotConnectionAcceptor
setListeningStateListener
in interface IBlaubotConnectionAcceptor
stateListener
- the listner to setpublic void setAcceptorListener(IBlaubotIncomingConnectionListener acceptorListener)
IBlaubotConnectionAcceptor
setAcceptorListener
in interface IBlaubotConnectionAcceptor
acceptorListener
- the listener to be setpublic ConnectionMetaDataDTO getConnectionMetaData()
IBlaubotConnectionAcceptor
getConnectionMetaData
in interface IBlaubotConnectionAcceptor
public boolean isStarted()
IBlaubotConnectionAcceptor
isStarted
in interface IBlaubotConnectionAcceptor