public class ExecutionContext
extends java.lang.Object
Holds the execution context for processing a single request. The ExecutionContext is made
available to Interceptor
classes that are interleaved with the regular request
processing lifecycle.
The ExecutionContext is not populated all at once, but in pieces as the request progresses. Check the accessor method for each item for information on when that item becomes available in the request processing lifecycle.
Constructor and Description |
---|
ExecutionContext() |
Modifier and Type | Method and Description |
---|---|
ActionBean |
getActionBean()
Retrieves the ActionBean instance that is associated with the current request.
|
ActionBeanContext |
getActionBeanContext()
Retrieves the ActionBeanContext associated with the current request.
|
java.lang.reflect.Method |
getHandler()
Retrieves the handler Method that is targeted by the current request.
|
LifecycleStage |
getLifecycleStage()
Gets the current LifecycleStage being processed.
|
Resolution |
getResolution()
Gets the Resolution that will be executed at the end of the execution.
|
boolean |
isResolutionFromHandler() |
Resolution |
proceed()
Continues the flow of execution.
|
void |
setActionBean(ActionBean actionBean)
Sets the ActionBean associated with the current request.
|
void |
setActionBeanContext(ActionBeanContext actionBeanContext)
Sets the ActionBeanContext for the current request.
|
void |
setHandler(java.lang.reflect.Method handler)
Sets the handler method that will be invoked to process the current request.
|
void |
setInterceptors(java.util.Collection<Interceptor> stack)
Used by the
DispatcherServlet to initialize and/or swap out the list of
Interceptor instances which should wrap the current LifecycleStage . |
void |
setLifecycleStage(LifecycleStage lifecycleStage)
Sets the current stage in the request processing lifecycle.
|
void |
setResolution(Resolution resolution)
Sets the Resolution that will be executed to terminate this execution.
|
void |
setResolutionFromHandler(boolean resolutionFromHandler) |
Resolution |
wrap(Interceptor target)
Used by the
DispatcherServlet to wrap a block of lifecycle code in
Interceptor calls. |
public void setInterceptors(java.util.Collection<Interceptor> stack)
DispatcherServlet
to initialize and/or swap out the list of
Interceptor
instances which should wrap the current LifecycleStage
.stack
- a non-null (though possibly empty) ordered collection of interceptorspublic Resolution wrap(Interceptor target) throws java.lang.Exception
DispatcherServlet
to wrap a block of lifecycle code in
Interceptor
calls.target
- a block of lifecycle/request processing code that is contained inside
a class that implements Interceptorjava.lang.Exception
- if the lifecycle code or an interceptor throws an Exceptionpublic ActionBeanContext getActionBeanContext()
LifecycleStage
.public void setActionBeanContext(ActionBeanContext actionBeanContext)
public ActionBean getActionBean()
LifecycleStage.ActionBeanResolution
has occurred.public void setActionBean(ActionBean actionBean)
public java.lang.reflect.Method getHandler()
LifecycleStage.HandlerResolution
has occurred.public void setHandler(java.lang.reflect.Method handler)
public Resolution getResolution()
LifecycleStage.ResolutionExecution
.public void setResolution(Resolution resolution)
public LifecycleStage getLifecycleStage()
public void setLifecycleStage(LifecycleStage lifecycleStage)
public Resolution proceed() throws java.lang.Exception
java.lang.Exception
- if the lifecycle code or one of the interceptors throws onepublic boolean isResolutionFromHandler()
public void setResolutionFromHandler(boolean resolutionFromHandler)
? Copyright 2005-2006, Stripes Development Team.