Package net.shibboleth.shared.spring.servlet.impl

# Class ChainingFilter

java.lang.Object
net.shibboleth.shared.spring.servlet.impl.ChainingFilter

All Implemented Interfaces:
  `Filter`

public class ChainingFilter extends Object implements Filter
Implementation of `Filter` that encapsulates and runs a chain of embedded filters in a defined order.

This is provided to deal with the problem of filter order when programmatic registration is done. Good or bad, some filters are order-sensitive and wishing that wasn't true doesn't change it.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`ChainingFilter.Chain`
Internal iteration of chain.

## Field Summary

Fields
Modifier and Type
Field
Description
`private List<ChainableFilter>`
`filters`
Embedded chain.

## Constructor Summary

Constructors
Constructor
Description
`ChainingFilter(List<ChainableFilter> filterChain)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`destroy()`
`void`
`doFilter(ServletRequest request, ServletResponse response, FilterChain chain)`
`void`
`init(FilterConfig filterConfig)`

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

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

## Field Details

### filters

@Nullable private List<ChainableFilter> filters
Embedded chain.

## Constructor Details

### ChainingFilter

@Autowired public ChainingFilter(@Nullable List<ChainableFilter> filterChain)
Constructor.

Parameters:
  `filterChain` - auto-wired chain of filters to run

## Method Details

### init

public void init(FilterConfig filterConfig) throws ServletException

Specified by:
  `init` in interface `Filter`
Throws:
  `ServletException`

### destroy

public void destroy()

Specified by:
  `destroy` in interface `Filter`

### doFilter

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException

Specified by:
  `doFilter` in interface `Filter`
Throws:
  `IOException`
  `ServletException`