com.opensymphony.xwork2

## Interface ActionProxy

- All Known Implementing Classes:
    DefaultActionProxy, MockActionProxy, StrutsActionProxy

      public interface ActionProxy

  ActionProxy is an extra layer between XWork and the action so that different proxies are possible.

  An example of this would be a remote proxy, where the layer between XWork and the action might be RMI or SOAP.

  Author:
    Jason Carreira

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `execute()` Execute this ActionProxy.
    `Object` | `getAction()` Gets the Action instance for this Proxy.
    `String` | `getActionName()` Gets the alias name this ActionProxy is mapped to.
    `ActionConfig` | `getConfig()` Gets the ActionConfig this ActionProxy is built from.
    `boolean` | `getExecuteResult()` Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.
    `ActionInvocation` | `getInvocation()` Gets the ActionInvocation associated with this ActionProxy.
    `String` | `getMethod()` Gets the method name to execute, or `null` if no method has been specified (meaning `execute` will be invoked).
    `String` | `getNamespace()` Gets the namespace the ActionConfig for this ActionProxy is mapped to.
    `boolean` | `isMethodSpecified()` Gets status of the method value's initialization.
    `void` | `setExecuteResult(boolean executeResult)` Sets whether this ActionProxy should also execute the Result after executing the Action.

- - ### Method Detail

    - #### getAction

          Object getAction()

      Gets the Action instance for this Proxy.
      Returns:
        the Action instance

    - #### getActionName

          String getActionName()

      Gets the alias name this ActionProxy is mapped to.
      Returns:
        the alias name

    - #### getConfig

          ActionConfig getConfig()

      Gets the ActionConfig this ActionProxy is built from.
      Returns:
        the ActionConfig

    - #### setExecuteResult

          void setExecuteResult(boolean executeResult)

      Sets whether this ActionProxy should also execute the Result after executing the Action.
      Parameters:
        `executeResult` - `true` to also execute the Result.

    - #### getExecuteResult

          boolean getExecuteResult()

      Gets the status of whether the ActionProxy is set to execute the Result after the Action is executed.
      Returns:
        the status

    - #### getInvocation

          ActionInvocation getInvocation()

      Gets the ActionInvocation associated with this ActionProxy.
      Returns:
        the ActionInvocation

    - #### getNamespace

          String getNamespace()

      Gets the namespace the ActionConfig for this ActionProxy is mapped to.
      Returns:
        the namespace

    - #### execute

          String execute()
                  throws Exception

      Execute this ActionProxy. This will set the ActionContext from the ActionInvocation into the ActionContext ThreadLocal before invoking the ActionInvocation, then set the old ActionContext back into the ThreadLocal.
      Returns:
        the result code returned from executing the ActionInvocation
      Throws:
        `Exception` - can be thrown.
      See Also:
        `ActionInvocation`

    - #### getMethod

          String getMethod()

      Gets the method name to execute, or `null` if no method has been specified (meaning `execute` will be invoked).
      Returns:
        the method to execute

    - #### isMethodSpecified

          boolean isMethodSpecified()

      Gets status of the method value's initialization.
      Returns:
        true if the method returned by getMethod() is not a default initializer value.

Copyright © 2000–2023 Apache Software Foundation. All rights reserved.