| ASF |
#482418 |
Tue Dec 05 00:04:26 UTC 2006 |
craigmcc |
Implement the remainder of the functionality needed for event processing in
shale-dialog (SHALE-251):
* A new listener interface (DialogLifecycleListener) and associated
abstract base class. If the application defines an application scoped
(not required, but conventional) managed bean that implements this
interface under a reserved managed bean name (Constants.LIFECYCLE_ATTR),
this listener will be notified when new DialogContextManager instances
are created (placed into session scope) or removed (removed from session
scope either deliberatly or because the session timed out). This gives
the application a hook to add listeners anywhere and everywhere it needs to.
* As a convenience, modify the contract for DialogContext.setData() such that,
if the specified "data" object is of a class that implements
DialogContextListener, automatically register it (upon entry) and
deregister it (upon completion of the dialog). This makes it extremely
simple for applications that want to be notified as states change, since
the app will most likely have a "data" object to maintain conversational
state anyway.
I did not see anywhere else that shale-dialog-scxml messed with the
data field directly; if there are such places, they will need to have the
listener related logic added there as well.
|