Public Member Functions | |
void | enterState () |
void | exitState (RemoteConnectorState nextState) |
AuthStatus | getAuthenticationStatus () |
boolean | canSendCommandToRemote (MenuCommand command) |
void | runLoop () throws Exception |
boolean com.thecoderscorner.menu.remote.states.RemoteConnectorState.canSendCommandToRemote | ( | MenuCommand | command | ) |
called before any command is sent in order for the state to disallow
command | the command to check |
Implemented in com.thecoderscorner.menu.remote.states.StreamNotConnectedState, com.thecoderscorner.menu.remote.states.SocketAwaitJoinState, com.thecoderscorner.menu.remote.states.SerialAwaitFirstMsgState, com.thecoderscorner.menu.remote.states.SendPairingMessageState, com.thecoderscorner.menu.remote.states.PairingAuthSuccessState, com.thecoderscorner.menu.remote.states.PairingAuthFailedState, com.thecoderscorner.menu.remote.states.NoOperationInitialState, com.thecoderscorner.menu.remote.states.JoinMessageArrivedState, com.thecoderscorner.menu.remote.states.ConnectionReadyState, com.thecoderscorner.menu.remote.states.ConnectionHasFailedState, com.thecoderscorner.menu.remote.states.BootstrapInProgressState, and com.thecoderscorner.menu.remote.states.AwaitingBootstrapState.
void com.thecoderscorner.menu.remote.states.RemoteConnectorState.enterState | ( | ) |
called when a state machine class becomes active
Implemented in com.thecoderscorner.menu.remote.states.StreamNotConnectedState, com.thecoderscorner.menu.remote.states.SocketAwaitJoinState, com.thecoderscorner.menu.remote.states.SendPairingMessageState, com.thecoderscorner.menu.remote.states.PairingAuthSuccessState, com.thecoderscorner.menu.remote.states.PairingAuthFailedState, com.thecoderscorner.menu.remote.states.NoOperationInitialState, com.thecoderscorner.menu.remote.states.JoinMessageArrivedState, com.thecoderscorner.menu.remote.states.ConnectionReadyState, com.thecoderscorner.menu.remote.states.ConnectionHasFailedState, and com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.
void com.thecoderscorner.menu.remote.states.RemoteConnectorState.exitState | ( | RemoteConnectorState | nextState | ) |
called when a state machine class is deactivated
Implemented in com.thecoderscorner.menu.remote.states.StreamNotConnectedState, com.thecoderscorner.menu.remote.states.PairingAuthSuccessState, com.thecoderscorner.menu.remote.states.PairingAuthFailedState, com.thecoderscorner.menu.remote.states.NoOperationInitialState, com.thecoderscorner.menu.remote.states.ConnectionReadyState, com.thecoderscorner.menu.remote.states.ConnectionHasFailedState, and com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.
AuthStatus com.thecoderscorner.menu.remote.states.RemoteConnectorState.getAuthenticationStatus | ( | ) |
Implemented in com.thecoderscorner.menu.remote.states.StreamNotConnectedState, com.thecoderscorner.menu.remote.states.SocketAwaitJoinState, com.thecoderscorner.menu.remote.states.SerialAwaitFirstMsgState, com.thecoderscorner.menu.remote.states.SendPairingMessageState, com.thecoderscorner.menu.remote.states.PairingAuthSuccessState, com.thecoderscorner.menu.remote.states.PairingAuthFailedState, com.thecoderscorner.menu.remote.states.NoOperationInitialState, com.thecoderscorner.menu.remote.states.JoinMessageArrivedState, com.thecoderscorner.menu.remote.states.ConnectionReadyState, com.thecoderscorner.menu.remote.states.ConnectionHasFailedState, com.thecoderscorner.menu.remote.states.BootstrapInProgressState, and com.thecoderscorner.menu.remote.states.AwaitingBootstrapState.
void com.thecoderscorner.menu.remote.states.RemoteConnectorState.runLoop | ( | ) | throws Exception |
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.
Implemented in com.thecoderscorner.menu.remote.states.StreamNotConnectedState, com.thecoderscorner.menu.remote.states.PairingAuthSuccessState, com.thecoderscorner.menu.remote.states.PairingAuthFailedState, com.thecoderscorner.menu.remote.states.NoOperationInitialState, com.thecoderscorner.menu.remote.states.ConnectionHasFailedState, and com.thecoderscorner.menu.remote.states.BaseMessageProcessingState.