Expose extended state
- ExtendedState is now exposed via StateMachine interface. - Add "sm variables" command to samples.
This commit is contained in:
@@ -37,6 +37,13 @@ public interface StateMachine<S, E> extends Region<S, E> {
|
||||
*/
|
||||
State<S,E> getInitialState();
|
||||
|
||||
/**
|
||||
* Gets the state machine extended state.
|
||||
*
|
||||
* @return extended state
|
||||
*/
|
||||
ExtendedState getExtendedState();
|
||||
|
||||
/**
|
||||
* Adds the state listener.
|
||||
*
|
||||
|
||||
@@ -177,6 +177,11 @@ public abstract class AbstractStateMachine<S, E> extends LifecycleObjectSupport
|
||||
return initialState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtendedState getExtendedState() {
|
||||
return extendedState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sendEvent(Message<E> event) {
|
||||
if (isComplete() || !isRunning()) {
|
||||
|
||||
Reference in New Issue
Block a user