org.springframework.webflow.execution
Class FlowExecutionListenerAdapter

java.lang.Object
  extended by org.springframework.webflow.execution.FlowExecutionListenerAdapter
All Implemented Interfaces:
FlowExecutionListener

public abstract class FlowExecutionListenerAdapter
extends java.lang.Object
implements FlowExecutionListener

An abstract adapter class for listeners (observers) of flow execution lifecycle events. The methods in this class are empty. This class exists as convenience for creating listener objects; subclass it and override what you need.

Author:
Erwin Vervaet, Keith Donald

Constructor Summary
FlowExecutionListenerAdapter()
           
 
Method Summary
 void eventSignaled(RequestContext context, Event event)
          Called when an event is signaled in the current state, but prior to any state transition.
 void exceptionThrown(RequestContext context, FlowExecutionException exception)
          Called when an exception is thrown during a flow execution, before the exception is handled by any registered handler.
 void paused(RequestContext context, ViewSelection selectedView)
          Called when a flow execution is paused, for instance when it is waiting for user input (after event processing).
 void requestProcessed(RequestContext context)
          Called when a client request has completed processing.
 void requestSubmitted(RequestContext context)
          Called when any client request is submitted to manipulate this flow execution.
 void resumed(RequestContext context)
          Called after a flow execution is successfully reactivated after pause (but before event processing).
 void sessionCreated(RequestContext context, FlowSession session)
          Called after a new flow session has been created but before it starts.
 void sessionEnded(RequestContext context, FlowSession session, AttributeMap output)
          Called when a flow execution session ends.
 void sessionEnding(RequestContext context, FlowSession session, MutableAttributeMap output)
          Called when the active flow execution session has been asked to end but before it has ended.
 void sessionStarted(RequestContext context, FlowSession session)
          Called after a new flow session has started.
 void sessionStarting(RequestContext context, FlowDefinition definition, MutableAttributeMap input)
          Called to indicate a new flow definition session is about to be created and started.
 void stateEntered(RequestContext context, StateDefinition previousState, StateDefinition newState)
          Called when a state transitions, after the transition occured.
 void stateEntering(RequestContext context, StateDefinition state)
          Called when a state transitions, after the transition is matched but before the transition occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowExecutionListenerAdapter

public FlowExecutionListenerAdapter()
Method Detail

requestSubmitted

public void requestSubmitted(RequestContext context)
Description copied from interface: FlowExecutionListener
Called when any client request is submitted to manipulate this flow execution. This call happens before request processing.

Specified by:
requestSubmitted in interface FlowExecutionListener
Parameters:
context - the source of the event

requestProcessed

public void requestProcessed(RequestContext context)
Description copied from interface: FlowExecutionListener
Called when a client request has completed processing.

Specified by:
requestProcessed in interface FlowExecutionListener
Parameters:
context - the source of the event

sessionStarting

public void sessionStarting(RequestContext context,
                            FlowDefinition definition,
                            MutableAttributeMap input)
Description copied from interface: FlowExecutionListener
Called to indicate a new flow definition session is about to be created and started. Called before the session is created. An exception may be thrown from this method to veto the start operation. Any type of runtime exception can be used for this purpose.

Specified by:
sessionStarting in interface FlowExecutionListener
Parameters:
context - the source of the event
definition - the flow for which a new session is starting
input - a mutable input map - attributes placed in this map are eligible for input mapping by the flow definition at startup

sessionCreated

public void sessionCreated(RequestContext context,
                           FlowSession session)
Description copied from interface: FlowExecutionListener
Called after a new flow session has been created but before it starts. Useful for setting arbitrary attributes in the session before the flow starts.

Specified by:
sessionCreated in interface FlowExecutionListener
Parameters:
context - the source of the event
session - the session that was created

sessionStarted

public void sessionStarted(RequestContext context,
                           FlowSession session)
Description copied from interface: FlowExecutionListener
Called after a new flow session has started. At this point the flow's start state has been entered and any other startup behaviors have been executed.

Specified by:
sessionStarted in interface FlowExecutionListener
Parameters:
context - the source of the event
session - the session that was started

eventSignaled

public void eventSignaled(RequestContext context,
                          Event event)
Description copied from interface: FlowExecutionListener
Called when an event is signaled in the current state, but prior to any state transition.

Specified by:
eventSignaled in interface FlowExecutionListener
Parameters:
context - the source of the event
event - the event that occured

stateEntering

public void stateEntering(RequestContext context,
                          StateDefinition state)
                   throws EnterStateVetoException
Description copied from interface: FlowExecutionListener
Called when a state transitions, after the transition is matched but before the transition occurs.

Specified by:
stateEntering in interface FlowExecutionListener
Parameters:
context - the source of the event
state - the proposed state to transition to
Throws:
EnterStateVetoException - when entering the state is not allowed

stateEntered

public void stateEntered(RequestContext context,
                         StateDefinition previousState,
                         StateDefinition newState)
Description copied from interface: FlowExecutionListener
Called when a state transitions, after the transition occured.

Specified by:
stateEntered in interface FlowExecutionListener
Parameters:
context - the source of the event
previousState - from state of the transition
newState - to state of the transition

resumed

public void resumed(RequestContext context)
Description copied from interface: FlowExecutionListener
Called after a flow execution is successfully reactivated after pause (but before event processing).

Specified by:
resumed in interface FlowExecutionListener
Parameters:
context - the source of the event

paused

public void paused(RequestContext context,
                   ViewSelection selectedView)
Description copied from interface: FlowExecutionListener
Called when a flow execution is paused, for instance when it is waiting for user input (after event processing).

Specified by:
paused in interface FlowExecutionListener
Parameters:
context - the source of the event
selectedView - the view that will display

sessionEnding

public void sessionEnding(RequestContext context,
                          FlowSession session,
                          MutableAttributeMap output)
Description copied from interface: FlowExecutionListener
Called when the active flow execution session has been asked to end but before it has ended.

Specified by:
sessionEnding in interface FlowExecutionListener
Parameters:
context - the source of the event
session - the current active session that is ending
output - the flow output produced by the ending session, this map may be modified by this listener to affect the output returned

sessionEnded

public void sessionEnded(RequestContext context,
                         FlowSession session,
                         AttributeMap output)
Description copied from interface: FlowExecutionListener
Called when a flow execution session ends. If the ended session was the root session of the flow execution, the entire flow execution also ends.

Specified by:
sessionEnded in interface FlowExecutionListener
Parameters:
context - the source of the event
session - ending flow session
output - final, unmodifiable output returned by the ended session

exceptionThrown

public void exceptionThrown(RequestContext context,
                            FlowExecutionException exception)
Description copied from interface: FlowExecutionListener
Called when an exception is thrown during a flow execution, before the exception is handled by any registered handler.

Specified by:
exceptionThrown in interface FlowExecutionListener
Parameters:
context - the source of the exception
exception - the exception that occurred


Copyright © 2009 Spring Framework. All Rights Reserved.