public class BlaubotWifiP2PAcceptor extends java.lang.Object implements IBlaubotConnectionAcceptor
Modifier | Constructor and Description |
---|---|
protected |
BlaubotWifiP2PAcceptor(BlaubotWifiP2PAdapter blaubotWifiP2PAdapter) |
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.
|
protected BlaubotWifiP2PAcceptor(BlaubotWifiP2PAdapter blaubotWifiP2PAdapter)
public void setBeaconStore(IBlaubotBeaconStore beaconStore)
IBlaubotConnectionAcceptor
setBeaconStore
in interface IBlaubotConnectionAcceptor
beaconStore
- the beaconStorepublic IBlaubotAdapter getAdapter()
IBlaubotConnectionAcceptor
getAdapter
in interface IBlaubotConnectionAcceptor
public void startListening()
IBlaubotConnectionAcceptor
startListening
in interface IBlaubotConnectionAcceptor
public void stopListening()
IBlaubotConnectionAcceptor
stopListening
in interface IBlaubotConnectionAcceptor
public boolean isStarted()
IBlaubotConnectionAcceptor
isStarted
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