Package org.springframework.web.servlet.config.annotation

# Class InterceptorRegistry

java.lang.Object
org.springframework.web.servlet.config.annotation.InterceptorRegistry

public class InterceptorRegistry extends Object
Helps with configuring a list of mapped interceptors.

Since:
  3.1
Author:
  Rossen Stoyanchev, Keith Donald

## Constructor Summary

Constructors
Constructor
Description
`InterceptorRegistry()`

## Method Summary

Modifier and Type
Method
Description
`InterceptorRegistration`
`addInterceptor(HandlerInterceptor interceptor)`
Adds the provided `HandlerInterceptor`.
`InterceptorRegistration`
`addWebRequestInterceptor(org.springframework.web.context.request.WebRequestInterceptor interceptor)`
Adds the provided `WebRequestInterceptor`.
`protected List<Object>`
`getInterceptors()`
Return all registered interceptors.

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

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

## Constructor Details

### InterceptorRegistry

public InterceptorRegistry()

## Method Details

### addInterceptor

public InterceptorRegistration addInterceptor(HandlerInterceptor interceptor)
Adds the provided `HandlerInterceptor`.

Parameters:
  `interceptor` - the interceptor to add
Returns:
  an `InterceptorRegistration` that allows you optionally configure the registered interceptor further for example adding URL patterns it should apply to.

### addWebRequestInterceptor

public InterceptorRegistration addWebRequestInterceptor(org.springframework.web.context.request.WebRequestInterceptor interceptor)
Adds the provided `WebRequestInterceptor`.

Parameters:
  `interceptor` - the interceptor to add
Returns:
  an `InterceptorRegistration` that allows you optionally configure the registered interceptor further for example adding URL patterns it should apply to.

### getInterceptors

protected List<Object> getInterceptors()
Return all registered interceptors.