org.apache.shale.dialog.base
Class AbstractDialogListener

java.lang.Object
  extended by org.apache.shale.dialog.base.AbstractDialogListener
All Implemented Interfaces:
Serializable, DialogListener

public abstract class AbstractDialogListener
extends Object
implements DialogListener, Serializable

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

Since:
1.0.4
See Also:
Serialized Form

Constructor Summary
AbstractDialogListener()
           
 
Method Summary
 DialogContext getDialogContext()
          

Return the DialogContext instance associated with this DialogListener.

 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 DialogListener.

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

Constructor Detail

AbstractDialogListener

public AbstractDialogListener()
Method Detail

onStart

public void onStart()

Handle the starting of the dialog instance.

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

onStop

public void onStop()

Handle the stopping of the dialog instance.

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

onException

public void onException(Exception e)

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

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

onEntry

public void onEntry(String stateId)

Handle an entry into a dialog state.

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

onExit

public void onExit(String stateId)

Handle an exit from a dialog state.

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

onTransition

public void onTransition(String fromStateId,
                         String toStateId)

Handle a transition being followed.

Specified by:
onTransition in interface DialogListener
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:
DialogListener.onTransition(java.lang.String,java.lang.String)

getDialogContext

public DialogContext getDialogContext()

Return the DialogContext instance associated with this DialogListener.

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

setDialogContext

public void setDialogContext(DialogContext dialogContext)

Set the DialogContext instance associated with this DialogListener.

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


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