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

# Class CookieBufferingFilter

java.lang.Object
net.shibboleth.shared.servlet.AbstractConditionalFilter
net.shibboleth.shared.spring.servlet.impl.CookieBufferingFilter

All Implemented Interfaces:
  `Filter`, `ChainableFilter`, `Ordered`

public class CookieBufferingFilter extends AbstractConditionalFilter implements ChainableFilter
Implementation of `Filter` which wraps the `HttpServletResponse` to ensure that only a single cookie of a given name is set.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`CookieBufferingFilter.CookieBufferingHttpServletResponseProxy`
An implementation of `HttpServletResponse` which buffers added cookies to ensure only a single cookie of a given name is eventually set.

## Nested classes/interfaces inherited from interface net.shibboleth.shared.spring.servlet.ChainableFilter

`ChainableFilter.FilterOrder`

## Field Summary

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`CookieBufferingFilter()`

## Method Summary

Modifier and Type
Method
Description
`void`
`destroy()`
`int`
`getOrder()`
`void`
`init(FilterConfig filterConfig)`
`protected void`
`runFilter(ServletRequest request, ServletResponse response, FilterChain chain)`
Subclasses should override this method to be called when the filter is directed to activate.

### Methods inherited from class net.shibboleth.shared.servlet.AbstractConditionalFilter

`doFilter, getActivationCondition, setActivationCondition`

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

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

### Methods inherited from interface jakarta.servlet.Filter

`doFilter`

## Constructor Details

### CookieBufferingFilter

public CookieBufferingFilter()

## Method Details

### init

public void init(FilterConfig filterConfig) throws ServletException

Specified by:
  `init` in interface `Filter`
Overrides:
  `init` in class `AbstractConditionalFilter`
Throws:
  `ServletException`

### destroy

public void destroy()

Specified by:
  `destroy` in interface `Filter`
Overrides:
  `destroy` in class `AbstractConditionalFilter`

### getOrder

public int getOrder()

Specified by:
  `getOrder` in interface `ChainableFilter`
Specified by:
  `getOrder` in interface `Ordered`

### runFilter

protected void runFilter(@Nonnull ServletRequest request, @Nonnull ServletResponse response, @Nonnull FilterChain chain) throws IOException, ServletException
Subclasses should override this method to be called when the filter is directed to activate.

Specified by:
  `runFilter` in class `AbstractConditionalFilter`
Parameters:
  `request` - servlet request
  `response` - servlet response
  `chain` - filter chain
Throws:
  `IOException` - on error
  `ServletException` - on error