public class BlaubotWebsocketAcceptor extends java.lang.Object implements IBlaubotConnectionAcceptor
Modifier and Type | Class and Description |
---|---|
class |
BlaubotWebsocketAcceptor.WebSocketServerInitializer
Configures the pipeline for the netty channel
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOG_TAG |
protected static boolean |
SSL |
Constructor and Description |
---|
BlaubotWebsocketAcceptor(IBlaubotAdapter adapter,
java.lang.String hostAddress,
int acceptorPort) |
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 static final java.lang.String LOG_TAG
protected static boolean SSL
public BlaubotWebsocketAcceptor(IBlaubotAdapter adapter, java.lang.String hostAddress, int acceptorPort)
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