|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
fireOnActivate()
Inform all registered DialogContextListener s that the dialog
instance has been activated. |
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 |
fireOnPassivate()
Inform all registered DialogContextListener s that the dialog
instance has been passivated. |
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 . |
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 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 fireOnActivate()
Inform all registered DialogContextListener
s that the dialog
instance has been activated.
protected void fireOnPassivate()
Inform all registered DialogContextListener
s that the dialog
instance has been passivated.
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 followed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |