Make end state a proper pseudostate

- Remove end state from constructors and handle
  it as a pseudostate.
- When sm enters state marked with end, stop
  machine.
- Added new events which are used to notify sm
  start and stop which now makes sense with
  a proper end pseudostate.
This commit is contained in:
Janne Valkealahti
2015-04-11 09:57:17 +01:00
parent 2721437b23
commit 247c90ad90
20 changed files with 362 additions and 78 deletions

View File

@@ -163,10 +163,11 @@ interface. Both of these have pros and cons which will be discussed later.
=== Application Context Events
Application context events classes are _OnTransitionStartEvent_,
_OnTransitionEvent_, _OnTransitionEndEvent_, _OnStateExitEvent_,
_OnStateEntryEvent_ and _OnStateChangedEvent_. There can be used as is
as spring typed _ApplicationListener_ class but all also share a
common class _StateMachineEvent_ which can be used to get events for
all.
_OnStateEntryEvent_, _OnStateChangedEvent_, _OnStateMachineStart_ and
_OnStateMachineStop_. These can be used as is with spring typed
_ApplicationListener_ class but they also share a common class
_StateMachineEvent_ which can be used to get statemachine related
events.
[source,java,indent=0]
----