org.apache.struts2.spi
Interface ActionContext


public interface ActionContext

Context of an action execution.

Author:
crazybob@google.com (Bob Lee)

Method Summary
 void addResultInterceptor(Result interceptor)
          Adds a result interceptor for the action.
 java.lang.Object getAction()
          Gets action instance.
 java.lang.String getActionName()
          Gets action name.
 java.lang.reflect.Method getMethod()
          Gets action method.
 java.lang.String getNamespacePath()
          Gets the path for the action's namespace.
 ActionContext getNext()
          Gets context of action which this action chained to.
 ActionContext getPrevious()
          Gets context of action which chained to us.
 Result getResult()
          Gets the Result instance for the action.
 

Method Detail

getAction

java.lang.Object getAction()
Gets action instance.


getMethod

java.lang.reflect.Method getMethod()
Gets action method.


getActionName

java.lang.String getActionName()
Gets action name.


getNamespacePath

java.lang.String getNamespacePath()
Gets the path for the action's namespace.


getResult

Result getResult()
Gets the Result instance for the action.

Returns:
Result instance or null if we don't have a result yet.

addResultInterceptor

void addResultInterceptor(Result interceptor)
Adds a result interceptor for the action. Enables executing code before and after a result, executing an alternate result, etc.


getPrevious

ActionContext getPrevious()
Gets context of action which chained to us.

Returns:
context of previous action or null if this is the first action in the chain

getNext

ActionContext getNext()
Gets context of action which this action chained to.

Returns:
context of next action or null if we haven't chained to another action yet or this is the last action in the chain.


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