/** Make a copy of the StateMachine maintaining the current state. * * @return a copy of the StateMachine. */ public Object clone() { StateMachine clone = new StateMachine(states, startState, description); clone.currentState = currentState; return clone; }
/** * Create a new StateMachine that follows the ServiceMBean * lifecycle, initialized to the STATE_UNREGISTERED state. * * @param description A string description for this state machine, or null * @return the StateMachine */ public static StateMachine createStateMachine(String description) { return new StateMachine(STATES, STATE_UNREGISTERED, description); }
/** * Create a new StateMachine that follows the ServiceMBean * lifecycle, initialized to the STATE_UNREGISTERED state. * * @param description A string description for this state machine, or null * @return the StateMachine */ public static StateMachine createStateMachine(String description) { return new StateMachine(STATES, STATE_UNREGISTERED, description); }
throw new Exception("Failed to resolve transition targets: " + resolveFailed); StateMachine sm = new StateMachine(states, startState, description); return sm;