MappedInterceptor (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.web.servlet.handler

## Class MappedInterceptor

- java.lang.Object
- - org.springframework.web.servlet.handler.MappedInterceptor

-     public final class MappedInterceptor
      extends Object

  Holds information about a HandlerInterceptor mapped to a path into the application. Provides a method to match a request path to the mapped path patterns.
  Since:
    3.0
  Author:
    Keith Donald, Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MappedInterceptor(String[] includePatterns, HandlerInterceptor interceptor)` Create a new MappedInterceptor instance.
    `MappedInterceptor(String[] includePatterns, String[] excludePatterns, HandlerInterceptor interceptor)` Create a new MappedInterceptor instance.
    `MappedInterceptor(String[] includePatterns, String[] excludePatterns, WebRequestInterceptor interceptor)` Create a new MappedInterceptor instance.
    `MappedInterceptor(String[] includePatterns, WebRequestInterceptor interceptor)` Create a new MappedInterceptor instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HandlerInterceptor` | `getInterceptor()` The actual Interceptor reference.
    `String[]` | `getPathPatterns()` The path into the application the interceptor is mapped to.
    `boolean` | `matches(String lookupPath, PathMatcher pathMatcher)` Returns `true` if the interceptor applies to the given request path.

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

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

- - ### Constructor Detail

    - #### MappedInterceptor

          public MappedInterceptor(String[] includePatterns,
                           HandlerInterceptor interceptor)

      Create a new MappedInterceptor instance.
      Parameters:
        `includePatterns` - the path patterns to map with a `null` value matching to all paths
        `interceptor` - the HandlerInterceptor instance to map to the given patterns

    - #### MappedInterceptor

          public MappedInterceptor(String[] includePatterns,
                           String[] excludePatterns,
                           HandlerInterceptor interceptor)

      Create a new MappedInterceptor instance.
      Parameters:
        `includePatterns` - the path patterns to map with a `null` value matching to all paths
        `excludePatterns` - the path patterns to exclude
        `interceptor` - the HandlerInterceptor instance to map to the given patterns

    - #### MappedInterceptor

          public MappedInterceptor(String[] includePatterns,
                           WebRequestInterceptor interceptor)

      Create a new MappedInterceptor instance.
      Parameters:
        `includePatterns` - the path patterns to map with a `null` value matching to all paths
        `interceptor` - the WebRequestInterceptor instance to map to the given patterns

    - #### MappedInterceptor

          public MappedInterceptor(String[] includePatterns,
                           String[] excludePatterns,
                           WebRequestInterceptor interceptor)

      Create a new MappedInterceptor instance.
      Parameters:
        `includePatterns` - the path patterns to map with a `null` value matching to all paths
        `interceptor` - the WebRequestInterceptor instance to map to the given patterns

  - ### Method Detail

    - #### getPathPatterns

          public String[] getPathPatterns()

      The path into the application the interceptor is mapped to.

    - #### getInterceptor

          public HandlerInterceptor getInterceptor()

      The actual Interceptor reference.

    - #### matches

          public boolean matches(String lookupPath,
                        PathMatcher pathMatcher)

      Returns `true` if the interceptor applies to the given request path.
      Parameters:
        `lookupPath` - the current request path
        `pathMatcher` - a path matcher for path pattern matching