org.apache.shale.dialog
Interface DialogListener

All Known Implementing Classes:
AbstractDialogListener

public interface DialogListener

JavaBeans listener for a single instance of a Shale dialog.

IMPLEMENTATION NOTE - Implementations of this interface will be stored in session scope, so they should be serializable.

Since:
1.0.4

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 exception)
          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.
 

Method Detail

onStart

void onStart()

Handle the starting of the dialog instance.


onStop

void onStop()

Handle the stopping of the dialog instance.


onException

void onException(Exception exception)

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

Parameters:
exception - A potentially implementation specific exception during the execution of this dialog instance

onEntry

void onEntry(String stateId)

Handle an entry into a dialog state.

Parameters:
stateId - Implementation specific identifier of the state that has been entered

onExit

void onExit(String stateId)

Handle an exit from a dialog state.

Parameters:
stateId - Implementation specific identifier of the state that has been exited

onTransition

void onTransition(String fromStateId,
                  String toStateId)

Handle a transition being followed.

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

getDialogContext

DialogContext getDialogContext()

Return the DialogContext instance associated with this DialogListener.

Returns:
The DialogContext whose execution we are listening to

setDialogContext

void setDialogContext(DialogContext dialogContext)

Set the DialogContext instance associated with this DialogListener.

Parameters:
dialogContext - The DialogContext whose execution we will track


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