|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.dialog.base.AbstractDialogContext
public abstract class AbstractDialogContext
Convenience abstract DialogContext implementation.
Provides listener registration and convenience event firing methods.
Subclasses are expected to be serializable.
| Constructor Summary | |
|---|---|
AbstractDialogContext()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.shale.dialog.DialogContext |
|---|
advance, getData, getId, getName, getOpaqueState, getParent, isActive, setData, setOpaqueState, start, stop |
| Constructor Detail |
|---|
public AbstractDialogContext()
| Method Detail |
|---|
public void addDialogContextListener(DialogContextListener listener)
DialogContextListener for this DialogContext.
Listener cannot be null.
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 exited
protected 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 followed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||