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)
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