org.apache.shale.dialog
Interface DialogContextListener

All Known Implementing Classes:
AbstractDialogContextListener, StateSavingListener

public interface DialogContextListener

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 DialogContextListener.
 void onActivate()
          Handle our parent DialogContext instance being placed into service for the current request.
 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 onPassivate()
          Handle our parent DialogContext instance being taken out of service at the end of a request.
 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.
 

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

onActivate

void onActivate()

Handle our parent DialogContext instance being placed into service for the current request. This will occur when a dialog is newly created (by any of the available means), or when it is recognized, during a subsequent postback, that there is a currently active dialog identiier.

NOTE - For a newly created DialogContext instance, this event will be fired after the instance has been started (and, therefore, after an onStart() callback to this listener).

Since:
1.1.0

onPassivate

void onPassivate()

Handle our parent DialogContext instance being taken out of service at the end of a request. The response for this request has already been rendered, so any changes to the JSF component tree will not have any effect.

NOTE - For a DialogContext instance being stopped, this event will be fired before the instance has been started (and, therefore, before an onStop() callback to this listener).

Since:
1.1.0

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

Returns:
The DialogContext whose execution we are listening to

setDialogContext

void setDialogContext(DialogContext dialogContext)

Set the DialogContext instance associated with this DialogContextListener.

Parameters:
dialogContext - The DialogContext whose execution we will track


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