/** * transition to halt state. Upon returning from processMessage we will exit all current states, * execute the halting() method and then all subsequent messages haltedProcessMesage will be * called. */ protected final void transitionToHaltingState() { mSmHandler.transitionTo(mSmHandler.mHaltingState); }
/** * transition to destination state. Upon returning from processMessage the current state's exit * will be executed and upon the next message arriving destState.enter will be invoked. * * <p>this function can also be called inside the enter function of the previous transition * target, but the behavior is undefined when it is called mid-way through a previous transition * (for example, calling this in the enter() routine of a intermediate node when the current * transition target is one of the nodes descendants). * * @param destState will be the state that receives the next message. */ protected final void transitionTo(IState destState) { mSmHandler.transitionTo(destState); }