tcMenuJavaAPI
Public Member Functions | List of all members
com.thecoderscorner.menu.remote.states.StreamNotConnectedState Class Reference
Inheritance diagram for com.thecoderscorner.menu.remote.states.StreamNotConnectedState:
com.thecoderscorner.menu.remote.states.RemoteConnectorState

Public Member Functions

 StreamNotConnectedState (RemoteConnectorContext context)
 
void runLoop () throws InterruptedException
 
void enterState ()
 
void exitState (RemoteConnectorState nextState)
 
AuthStatus getAuthenticationStatus ()
 
boolean canSendCommandToRemote (MenuCommand command)
 

Member Function Documentation

◆ canSendCommandToRemote()

boolean com.thecoderscorner.menu.remote.states.StreamNotConnectedState.canSendCommandToRemote ( MenuCommand  command)

called before any command is sent in order for the state to disallow

Parameters
commandthe command to check
Returns
true to send, false to suppress.

Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.

◆ enterState()

void com.thecoderscorner.menu.remote.states.StreamNotConnectedState.enterState ( )

called when a state machine class becomes active

Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.

◆ exitState()

void com.thecoderscorner.menu.remote.states.StreamNotConnectedState.exitState ( RemoteConnectorState  nextState)

called when a state machine class is deactivated

Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.

◆ getAuthenticationStatus()

AuthStatus com.thecoderscorner.menu.remote.states.StreamNotConnectedState.getAuthenticationStatus ( )
Returns
the current authentication status as determined by the state.

Implements com.thecoderscorner.menu.remote.states.RemoteConnectorState.

◆ runLoop()

void com.thecoderscorner.menu.remote.states.StreamNotConnectedState.runLoop ( ) throws InterruptedException

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.


The documentation for this class was generated from the following file: