Spring Framework

org.springframework.web.servlet.handler
Class MappedInterceptor

java.lang.Object
  extended by org.springframework.web.servlet.handler.MappedInterceptor

public final class MappedInterceptor
extends java.lang.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
MappedInterceptor(java.lang.String[] pathPatterns, HandlerInterceptor interceptor)
          Create a new MappedInterceptor instance.
MappedInterceptor(java.lang.String[] pathPatterns, WebRequestInterceptor interceptor)
          Create a new MappedInterceptor instance.
 
Method Summary
 HandlerInterceptor getInterceptor()
          The actual Interceptor reference.
 java.lang.String[] getPathPatterns()
          The path into the application the interceptor is mapped to.
 boolean matches(java.lang.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(java.lang.String[] pathPatterns,
                         HandlerInterceptor interceptor)
Create a new MappedInterceptor instance.

Parameters:
pathPatterns - 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(java.lang.String[] pathPatterns,
                         WebRequestInterceptor interceptor)
Create a new MappedInterceptor instance.

Parameters:
pathPatterns - 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 java.lang.String[] getPathPatterns()
The path into the application the interceptor is mapped to.


getInterceptor

public HandlerInterceptor getInterceptor()
The actual Interceptor reference.


matches

public boolean matches(java.lang.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

Spring Framework