public abstract class AbstractDialogContext extends Object implements DialogContext
Convenience abstract DialogContext implementation.
Provides listener registration and convenience event firing methods.
Subclasses are expected to be serializable.
| Constructor and Description |
|---|
AbstractDialogContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDialogContextListener(DialogContextListener listener)
Register given
DialogContextListener for this DialogContext. |
protected void |
fireOnEntry(String stateId)
Inform all registered
DialogContextListeners that the dialog instance
execution has entered a particular state. |
protected void |
fireOnException(Exception exception)
Inform all registered
DialogContextListeners that the dialog
instance has encountered an unexpected error condition. |
protected void |
fireOnExit(String stateId)
Inform all registered
DialogContextListeners that the dialog instance
execution has exited a particular state. |
protected void |
fireOnStart()
Inform all registered
DialogContextListeners that the dialog
instance has begun execution. |
protected void |
fireOnStop()
Inform all registered
DialogContextListeners that the dialog
instance has finished execution normally. |
protected void |
fireOnTransition(String fromStateId,
String toStateId)
Inform all registered
DialogContextListeners that the dialog instance
execution has followed a particular transition. |
DialogContextListener[] |
getDialogContextListeners()
Return the set of currently registered
DialogContextListeners. |
void |
removeDialogContextListener(DialogContextListener listener)
Remove this previously registered
DialogContextListener for this
DialogContext. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadvance, getData, getId, getName, getOpaqueState, getParent, isActive, setData, setOpaqueState, start, stoppublic void addDialogContextListener(DialogContextListener listener)
addDialogContextListener in interface DialogContextlistener - The DialogContextListener instance.public DialogContextListener[] getDialogContextListeners()
DialogContextListeners.getDialogContextListeners in interface DialogContextpublic void removeDialogContextListener(DialogContextListener listener)
DialogContextListener for this
DialogContext. The listener will no longer receive any
associated callbacks.removeDialogContextListener in interface DialogContextlistener - The DialogContextListener instance.protected void fireOnStart()
DialogContextListeners that the dialog
instance has begun execution.protected void fireOnStop()
DialogContextListeners that the dialog
instance has finished execution normally.protected void fireOnException(Exception exception)
DialogContextListeners that the dialog
instance has encountered an unexpected error condition. The exception
is first logged for archival.exception - A potentially implementation specific exception
during the execution of this dialog instanceprotected void fireOnEntry(String stateId)
DialogContextListeners that the dialog instance
execution has entered a particular state.stateId - Implementation specific identifier of the state
that has been enteredprotected void fireOnExit(String stateId)
DialogContextListeners that the dialog instance
execution has exited a particular state.stateId - Implementation specific identifier of the state
that has been exitedprotected void fireOnTransition(String fromStateId, String toStateId)
DialogContextListeners that the dialog instance
execution has followed a particular transition.fromStateId - Implementation specific identifier of the source
state for the transition that has been followedtoStateId - Implementation specific identifier of the target
state for the transition that has been followedCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.