org.apache.shale.dialog.base
Class AbstractDialogContextListener

java.lang.Object
  extended by org.apache.shale.dialog.base.AbstractDialogContextListener
All Implemented Interfaces:
DialogContextListener

public abstract class AbstractDialogContextListener
extends Object
implements DialogContextListener

Convenience abstract DialogContextListener implementation. Subclasses are expected to be serializable.

Since:
1.0.4

Constructor Summary
AbstractDialogContextListener()
           
 
Method Summary
 DialogContext getDialogContext()
          

Return the DialogContext instance associated with this DialogContextListener.

 void onEntry(String stateId)
          

Handle an entry into a dialog state.

 void onException(Exception e)
          

Handle an unexpected failure during the execution of this dialg instance.

 void onExit(String stateId)
          

Handle an exit from a dialog state.

 void onStart()
          

Handle the starting of the dialog instance.

 void onStop()
          

Handle the stopping of the dialog instance.

 void onTransition(String fromStateId, String toStateId)
          

Handle a transition being followed.

 void setDialogContext(DialogContext dialogContext)
          

Set the DialogContext instance associated with this DialogContextListener.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDialogContextListener

public AbstractDialogContextListener()
Method Detail

onStart

public void onStart()

Handle the starting of the dialog instance.

Specified by:
onStart in interface DialogContextListener
See Also:
DialogContextListener.onStart()

onStop

public void onStop()

Handle the stopping of the dialog instance.

Specified by:
onStop in interface DialogContextListener
See Also:
DialogContextListener.onStop()

onException

public void onException(Exception e)

Handle an unexpected failure during the execution of this dialg instance.

Specified by:
onException in interface DialogContextListener
Parameters:
e - A potentially implementation specific exception during the execution of this dialog instance
See Also:
DialogContextListener.onException(java.lang.Exception)

onEntry

public void onEntry(String stateId)

Handle an entry into a dialog state.

Specified by:
onEntry in interface DialogContextListener
Parameters:
stateId - Implementation specific identifier of the state that has been entered
See Also:
DialogContextListener.onEntry(java.lang.String)

onExit

public void onExit(String stateId)

Handle an exit from a dialog state.

Specified by:
onExit in interface DialogContextListener
Parameters:
stateId - Implementation specific identifier of the state that has been exited
See Also:
DialogContextListener.onExit(java.lang.String)

onTransition

public void onTransition(String fromStateId,
                         String toStateId)

Handle a transition being followed.

Specified by:
onTransition in interface DialogContextListener
Parameters:
fromStateId - Implementation specific identifier of the source state for the transition that has been followed
toStateId - Implementation specific identifier of the target state for the transition that has been followed
See Also:
DialogContextListener.onTransition(java.lang.String,java.lang.String)

getDialogContext

public DialogContext getDialogContext()

Return the DialogContext instance associated with this DialogContextListener.

Specified by:
getDialogContext in interface DialogContextListener
Returns:
The DialogContext whose execution we are listening to
See Also:
DialogContextListener.getDialogContext()

setDialogContext

public void setDialogContext(DialogContext dialogContext)

Set the DialogContext instance associated with this DialogContextListener.

Specified by:
setDialogContext in interface DialogContextListener
Parameters:
dialogContext - The DialogContext whose execution we will track
See Also:
DialogContextListener.setDialogContext(org.apache.shale.dialog.DialogContext)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.