Package org.apache.struts2

# Class DefaultUnknownHandlerManager

java.lang.Object
org.apache.struts2.DefaultUnknownHandlerManager

All Implemented Interfaces:
  `UnknownHandlerManager`

public class DefaultUnknownHandlerManager extends Object implements UnknownHandlerManager
Default implementation of UnknownHandlerManager

See Also:
  - `UnknownHandlerManager`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ArrayList<UnknownHandler>`
  `unknownHandlers`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultUnknownHandlerManager()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `build()`
  Builds a list of UnknownHandlers in the order specified by the configured "unknown-handler-stack".
  `List<UnknownHandler>`
  `getUnknownHandlers()`
  `ActionConfig`
  `handleUnknownAction(String namespace, String actionName)`
  Iterate over UnknownHandlers and return the result of the first one that can handle it
  `Object`
  `handleUnknownMethod(Object action, String methodName)`
  Iterate over UnknownHandlers and return the result of the first one that can handle it.
  `Result`
  `handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode)`
  Iterate over UnknownHandlers and return the result of the first one that can handle it
  `boolean`
  `hasUnknownHandlers()`
  `void`
  `setContainer(Container container)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### unknownHandlers

    protected ArrayList<UnknownHandler> unknownHandlers

- ## Constructor Details

  - ### DefaultUnknownHandlerManager

    public DefaultUnknownHandlerManager()

- ## Method Details

  - ### setContainer

    public void setContainer(Container container)

  - ### build

    protected void build() throws Exception
    Builds a list of UnknownHandlers in the order specified by the configured "unknown-handler-stack". If "unknown-handler-stack" was not configured, all UnknownHandlers will be returned, in no specific order
    Throws:
      `Exception` - in case of any error

  - ### handleUnknownResult

    public Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode)
    Iterate over UnknownHandlers and return the result of the first one that can handle it
    Specified by:
      `handleUnknownResult` in interface `UnknownHandlerManager`
    Parameters:
      `actionContext` - the action context
      `actionName` - the action name
      `actionConfig` - the action config
      `resultCode` - the result code

  - ### handleUnknownMethod

    public Object handleUnknownMethod(Object action, String methodName) throws NoSuchMethodException
    Iterate over UnknownHandlers and return the result of the first one that can handle it. Must throw an exception if method cannot be handled.
    Specified by:
      `handleUnknownMethod` in interface `UnknownHandlerManager`
    Parameters:
      `action` - the action
      `methodName` - the method name
    Returns:
      Result representing result of given action method
    Throws:
      `NoSuchMethodException` - if method con not be handled

  - ### handleUnknownAction

    public ActionConfig handleUnknownAction(String namespace, String actionName)
    Iterate over UnknownHandlers and return the result of the first one that can handle it
    Specified by:
      `handleUnknownAction` in interface `UnknownHandlerManager`
    Parameters:
      `namespace` - the namespace
      `actionName` - the action name

  - ### hasUnknownHandlers

    public boolean hasUnknownHandlers()
    Specified by:
      `hasUnknownHandlers` in interface `UnknownHandlerManager`

  - ### getUnknownHandlers

    public List<UnknownHandler> getUnknownHandlers()
    Specified by:
      `getUnknownHandlers` in interface `UnknownHandlerManager`