public class BlaubotConnectorMock extends java.lang.Object implements IBlaubotConnector
Constructor and Description |
---|
BlaubotConnectorMock(AdapterMock adapter) |
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 |
mockConnectToDevice(IBlaubotConnection connection,
BlaubotConnectionAcceptorMock connectionAcceptorMock)
Mock a new connection by directly injecting it via this connector
|
void |
setBeaconStore(IBlaubotBeaconStore beaconStore)
Setter method for the dependency injection of a beacon store.
|
void |
setIncomingConnectionListener(IBlaubotIncomingConnectionListener acceptorConnectorListener)
Setter method for a callback that will be triggered when this
connector successfully established a connection to a remote device.
|
public BlaubotConnectorMock(AdapterMock adapter)
public 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 mockConnectToDevice(IBlaubotConnection connection, BlaubotConnectionAcceptorMock connectionAcceptorMock)
connection
- the connection to be mockedconnectionAcceptorMock
- the mocked acceptorpublic void setIncomingConnectionListener(IBlaubotIncomingConnectionListener acceptorConnectorListener)
IBlaubotConnector
setIncomingConnectionListener
in interface IBlaubotConnector
acceptorConnectorListener
- the listener instancepublic IBlaubotConnection connectToBlaubotDevice(IBlaubotDevice blaubotDevice) throws IncompatibleBlaubotDeviceException
IBlaubotConnector
IBlaubotDevice
.connectToBlaubotDevice
in interface IBlaubotConnector
blaubotDevice
- the device to connect toIncompatibleBlaubotDeviceException