Public Member Functions | |
void | enterState () |
void | runLoop () |
void | exitState (RemoteConnectorState nextState) |
Public Member Functions inherited from com.thecoderscorner.menu.remote.states.RemoteConnectorState | |
AuthStatus | getAuthenticationStatus () |
boolean | canSendCommandToRemote (MenuCommand command) |
Protected Member Functions | |
BaseMessageProcessingState (RemoteConnectorContext context) | |
abstract void | processTimeout () |
abstract boolean | processMessage (MenuCommand cmd) |
void | markDone () |
boolean | checkIfThereIsAnHbEnd (MenuCommand cmd) |
Protected Attributes | |
final System.Logger | logger = System.getLogger(getClass().getSimpleName()) |
final RemoteConnectorContext | context |
AtomicInteger | disconnectInterval = new AtomicInteger(5000) |
AtomicLong | lastReception = new AtomicLong(0) |
void com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.enterState | ( | ) |
called when a state machine class becomes active
Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.
Reimplemented in com.thecoderscorner.menu.remote.states.SocketAwaitJoinState, com.thecoderscorner.menu.remote.states.SendPairingMessageState, com.thecoderscorner.menu.remote.states.JoinMessageArrivedState, and com.thecoderscorner.menu.remote.states.ConnectionReadyState.
void com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.exitState | ( | RemoteConnectorState | nextState | ) |
called when a state machine class is deactivated
Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.
Reimplemented in com.thecoderscorner.menu.remote.states.ConnectionReadyState.
void com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.runLoop | ( | ) |
called when a state is the current state, the state can read messages and attempt connections in this loop. It must be returned once the state is exited to avoid deadlocking the API. Exceptions can be thrown by the loop safely and will be logged in the connection logic.
Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.