org.apache.shale.dialog.base
Class AbstractDialogContextListener

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

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 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 e)
          

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.

 
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)

onActivate

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

Specified by:
onActivate in interface DialogContextListener
Since:
1.1.0
See Also:
DialogContextListener.onActivate()

onPassivate

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

Specified by:
onPassivate in interface DialogContextListener
Since:
1.1.0
See Also:
DialogContextListener.onPassivate()

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.