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
DialogContextListener s that the dialog instance
execution has entered a particular state. |
protected void |
fireOnException(Exception exception)
Inform all registered
DialogContextListener s that the dialog
instance has encountered an unexpected error condition. |
protected void |
fireOnExit(String stateId)
Inform all registered
DialogContextListener s that the dialog instance
execution has exited a particular state. |
protected void |
fireOnStart()
Inform all registered
DialogContextListener s that the dialog
instance has begun execution. |
protected void |
fireOnStop()
Inform all registered
DialogContextListener s that the dialog
instance has finished execution normally. |
protected void |
fireOnTransition(String fromStateId,
String toStateId)
Inform all registered
DialogContextListener s that the dialog instance
execution has followed a particular transition. |
DialogContextListener[] |
getDialogContextListeners()
Return the set of currently registered
DialogContextListener s. |
void |
removeDialogContextListener(DialogContextListener listener)
Remove this previously registered
DialogContextListener for this
DialogContext . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
advance, getData, getId, getName, getOpaqueState, getParent, isActive, setData, setOpaqueState, start, stop
public void addDialogContextListener(DialogContextListener listener)
addDialogContextListener
in interface DialogContext
listener
- The DialogContextListener
instance.public DialogContextListener[] getDialogContextListeners()
DialogContextListener
s.getDialogContextListeners
in interface DialogContext
public void removeDialogContextListener(DialogContextListener listener)
DialogContextListener
for this
DialogContext
. The listener will no longer receive any
associated callbacks.removeDialogContextListener
in interface DialogContext
listener
- The DialogContextListener
instance.protected void fireOnStart()
DialogContextListener
s that the dialog
instance has begun execution.protected void fireOnStop()
DialogContextListener
s that the dialog
instance has finished execution normally.protected void fireOnException(Exception exception)
DialogContextListener
s 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)
DialogContextListener
s 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)
DialogContextListener
s 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)
DialogContextListener
s 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.