org.szegedi.spring.web.jsflow
Interface FlowExecutionInterceptor


public interface FlowExecutionInterceptor

An interface for objects that can intercept execution of a flow, and perform operation before and after it.

Version:
$Id: $
Author:
Attila Szegedi

Method Summary
 void afterFlowExecution(javax.servlet.http.HttpServletRequest request, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, java.lang.Exception e)
          Executed after the flow's script ended runnnig.
 void beforeFlowExecution(javax.servlet.http.HttpServletRequest request, java.lang.String scriptPath, org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope)
          Executed before the flow's script starts running.
 

Method Detail

beforeFlowExecution

void beforeFlowExecution(javax.servlet.http.HttpServletRequest request,
                         java.lang.String scriptPath,
                         org.mozilla.javascript.Context cx,
                         org.mozilla.javascript.Scriptable scope)
                         throws java.lang.Exception
Executed before the flow's script starts running. Typically, this method will populate the scope based on data from the HTTP request.

Parameters:
request - the HTTP request that initiated the flow.
scriptPath - the pathname of the script that will be executed
cx - the Rhino Context object that is used to run the initial stage of the flow
scope - the global variable scope for the flow - it will typically be manipulated by this method.
Throws:
java.lang.Exception

afterFlowExecution

void afterFlowExecution(javax.servlet.http.HttpServletRequest request,
                        org.mozilla.javascript.Context cx,
                        org.mozilla.javascript.Scriptable scope,
                        java.lang.Exception e)
                        throws java.lang.Exception
Executed after the flow's script ended runnnig.

Parameters:
request - the HTTP request that concluded the flow.
cx - the Rhino Context object that is used to run the terminating stage of the flow
scope - the global variable scope for the flow
e - the cause of flow execution termination. It is null if the flow execution terminated normally. The interceptor must not rethrow it, it will be retrown by the FlowController after this method executed.
Throws:
java.lang.Exception