Allows for programmatic control of a state machines execution.
The *Now() family of methods move to a new
State immediately and let the new
State handle the current
Event .
The *Next() family on the other hand let the new
State handle the next
Event which is generated which make these method the
programmatic equivalent of using the
org.apache.mina.statemachine.annotation.Transition annotation.
Using the breakAndCall*() and breakAndReturn* methods one
can create sub state machines which behave very much like sub routines.
When calling a state the current state (or the specified returnTo
state) will be pushed on a stack.