Class ClientServerWait
- java.lang.Object
-
- org.openmuc.jeebus.ship.state.machine.cmi.ClientServerWait
-
- All Implemented Interfaces:
StateHandler
public class ClientServerWait extends java.lang.Object implements StateHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openmuc.jeebus.ship.state.machine.StateHandler
StateHandler.Handles, StateHandler.UsesExtraData
-
-
Field Summary
-
Fields inherited from interface org.openmuc.jeebus.ship.state.machine.StateHandler
LOGGER, UNIMPLEMENTED
-
-
Constructor Summary
Constructors Constructor Description ClientServerWait()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonBeforeExit(State pendingNext, StateHandlerContext context)Called just before the state machine transitions to a next state.voidonEntered(State previous, StateHandlerContext context)Called when the state machine enters this state.voidonMessageReceived(StateHandlerContext context)Called when a message was received from the communication partner.voidonTimeoutExpired(SpecifiedTimeout kind, StateHandlerContext context)Called when a previously started timeout expires.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openmuc.jeebus.ship.state.machine.StateHandler
getExtraDataType, processMessage
-
-
-
-
Method Detail
-
onEntered
public void onEntered(State previous, StateHandlerContext context)
Description copied from interface:StateHandlerCalled when the state machine enters this state.Invoking
StateHandlerContext.transitionTo(State)inside this method will defer the transition untilonEnteredfinishes.- Specified by:
onEnteredin interfaceStateHandler- Parameters:
previous- the previous statecontext- the execution context
-
onBeforeExit
public void onBeforeExit(State pendingNext, StateHandlerContext context)
Description copied from interface:StateHandlerCalled just before the state machine transitions to a next state.Invoking
StateHandlerContext.transitionTo(State)inside this method is an error.- Specified by:
onBeforeExitin interfaceStateHandler- Parameters:
pendingNext- the state that will be enteredcontext- the execution context
-
onTimeoutExpired
public void onTimeoutExpired(SpecifiedTimeout kind, StateHandlerContext context)
Description copied from interface:StateHandlerCalled when a previously started timeout expires.- Specified by:
onTimeoutExpiredin interfaceStateHandler- Parameters:
kind- which timeout expired
-
onMessageReceived
public void onMessageReceived(StateHandlerContext context)
Description copied from interface:StateHandlerCalled when a message was received from the communication partner.If you wish to evaluate the message, the returned command should contain
StateHandlerContext.processMessage(), which will causeStateHandler.processMessage(byte[], StateHandlerContext)to be called with the message contents.- Specified by:
onMessageReceivedin interfaceStateHandler- Parameters:
context- the execution context
-
-