public class BlaubotConnectionAcceptorMock extends java.lang.Object implements IBlaubotConnectionAcceptor
| Constructor and Description |
|---|
BlaubotConnectionAcceptorMock(AdapterMock adapterMock) |
| 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 |
mockNewConnection(IBlaubotConnection connection) |
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 BlaubotConnectionAcceptorMock(AdapterMock adapterMock)
public void mockNewConnection(IBlaubotConnection connection)
public void setBeaconStore(IBlaubotBeaconStore beaconStore)
IBlaubotConnectionAcceptorsetBeaconStore in interface IBlaubotConnectionAcceptorbeaconStore - the beaconStorepublic IBlaubotAdapter getAdapter()
IBlaubotConnectionAcceptorgetAdapter in interface IBlaubotConnectionAcceptorpublic void startListening()
IBlaubotConnectionAcceptorstartListening in interface IBlaubotConnectionAcceptorpublic void stopListening()
IBlaubotConnectionAcceptorstopListening in interface IBlaubotConnectionAcceptorpublic boolean isStarted()
IBlaubotConnectionAcceptorisStarted in interface IBlaubotConnectionAcceptorpublic void setListeningStateListener(IBlaubotListeningStateListener stateListener)
IBlaubotConnectionAcceptorsetListeningStateListener in interface IBlaubotConnectionAcceptorstateListener - the listner to setpublic void setAcceptorListener(IBlaubotIncomingConnectionListener acceptorListener)
IBlaubotConnectionAcceptorsetAcceptorListener in interface IBlaubotConnectionAcceptoracceptorListener - the listener to be setpublic ConnectionMetaDataDTO getConnectionMetaData()
IBlaubotConnectionAcceptorgetConnectionMetaData in interface IBlaubotConnectionAcceptor