This class demonstrates one approach for providing the base functionality needed by classes representing stateful entities, whose behaviors are defined via SCXML documents.
SCXML documents (more generically, UML state chart diagrams) can be used to define stateful behavior of objects, and Commons SCXML enables developers to use this model directly into the corresponding code artifacts. The resulting artifacts tend to be much simpler, embody a useful separation of concerns and are easier to understand and maintain. As the size of the modeled entity grows, these benefits become more apparent.
This approach functions by registering an SCXMLListener that gets notified onentry, and calls the namesake method for each state that has been entered.
This class swallows all exceptions only to log them. Developers of subclasses should think of themselves as "component developers" catering to other end users, and therefore ensure that the subclasses are free of ModelException
s and the like. Most methods are protected
for ease of subclassing.