Package net.shibboleth.shared.servlet.impl

# Class ChainingHttpServletRequestValidator

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.servlet.impl.ChainingHttpServletRequestValidator

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `HttpServletRequestValidator`

public class ChainingHttpServletRequestValidator extends AbstractInitializableComponent implements HttpServletRequestValidator
Implementation for a chain of `HttpServletRequestValidator`.

Since:
  9.1.4

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.slf4j.Logger`
`log`
Logger.
`private List<HttpServletRequestValidator>`
`validators`
Chain validators.

## Constructor Summary

Constructors
Constructor
Description
`ChainingHttpServletRequestValidator()`

## Method Summary

Modifier and Type
Method
Description
`List<HttpServletRequestValidator>`
`getValidators()`
Get the list of registered validators.
`void`
`setValidators(List<HttpServletRequestValidator> newValidators)`
Set the list of registered validators.
`void`
`validate(HttpServletRequest request)`
Validate the request.

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

## Field Details

### log

private org.slf4j.Logger log
Logger.

### validators

@Nonnull private List<HttpServletRequestValidator> validators
Chain validators.

## Constructor Details

### ChainingHttpServletRequestValidator

public ChainingHttpServletRequestValidator()

## Method Details

### getValidators

@Nonnull @Unmodifiable @NotLive public List<HttpServletRequestValidator> getValidators()
Get the list of registered validators.

Returns:
  the list of validators

### setValidators

public void setValidators(@Nullable List<HttpServletRequestValidator> newValidators)
Set the list of registered validators.

Parameters:
  `newValidators` - the validators to use

### validate

public void validate(@Nonnull HttpServletRequest request) throws ServletException
Validate the request.

Specified by:
  `validate` in interface `HttpServletRequestValidator`
Parameters:
  `request` - the request to validate
Throws:
  `ServletException` - if the request is determined to be invalid