Created
June 27, 2017 05:16
-
-
Save calvincodes/a99f97ae48d3ff57f484d06b24461cab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public StateMachineListener<States, Events> listener() { | |
return new StateMachineListenerAdapter<States, Events>() { | |
@Override | |
public void stateChanged(State<States, Events> from, State<States, Events> to) { | |
if (from == null) { | |
System.out.println("State machine initialised in state " + to.getId()); | |
} else { | |
System.out.println("State changed from " + from.getId() + " to " + to.getId()); | |
} | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment