org.apache.struts2.dispatcher

## Class InitOperations

- java.lang.Object
- - org.apache.struts2.dispatcher.InitOperations

-     public class InitOperations
      extends Object

  Contains initialization operations

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InitOperations()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Pattern>` | `buildExcludedPatternsList(Dispatcher dispatcher)` Extract a list of patterns to exclude from request filtering
    `void` | `cleanup()`
    `protected Dispatcher` | `createDispatcher(HostConfig filterConfig)` Create a `Dispatcher`
    `Dispatcher` | `findDispatcherOnThread()`
    `Dispatcher` | `initDispatcher(HostConfig filterConfig)` Creates and initializes the dispatcher
    `StaticContentLoader` | `initStaticContentLoader(HostConfig filterConfig, Dispatcher dispatcher)` Initializes the static content loader with the filter configuration

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

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

- - ### Constructor Detail

    - #### InitOperations

          public InitOperations()

  - ### Method Detail

    - #### initDispatcher

          public Dispatcher initDispatcher(HostConfig filterConfig)

      Creates and initializes the dispatcher
      Parameters:
        `filterConfig` - host configuration
      Returns:
        the dispatcher

    - #### initStaticContentLoader

          public StaticContentLoader initStaticContentLoader(HostConfig filterConfig,
                                                             Dispatcher dispatcher)

      Initializes the static content loader with the filter configuration
      Parameters:
        `filterConfig` - host configuration
        `dispatcher` - the dispatcher
      Returns:
        the static content loader

    - #### findDispatcherOnThread

          public Dispatcher findDispatcherOnThread()

      Returns:
        The dispatcher on the thread.
      Throws:
        `IllegalStateException` - If there is no dispatcher available

    - #### createDispatcher

          protected Dispatcher createDispatcher(HostConfig filterConfig)

      Create a `Dispatcher`
      Parameters:
        `filterConfig` - host configuration
      Returns:
        The dispatcher on the thread.

    - #### cleanup

          public void cleanup()

    - #### buildExcludedPatternsList

          public List<Pattern> buildExcludedPatternsList(Dispatcher dispatcher)

      Extract a list of patterns to exclude from request filtering
      Parameters:
        `dispatcher` - The dispatcher to check for exclude pattern configuration
      Returns:
        a List of Patterns for request to exclude if apply, or `null`
      See Also:
        `StrutsConstants.STRUTS_ACTION_EXCLUDE_PATTERN`

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