/** * This method verify if the transition from the current state to dest is valid. If so, the * current state is updated to dest. The up-to-date current state is returned. * * @param src The source state. * @param dest The destination state. * @return The curent state. */ public synchronized String transitionState(String dest) { if (stateMachine.isTransitionValid(currentState, dest)) { currentState = dest; } return currentState; }