Package org.springframework.security.web.access.channel

# Class ChannelDecisionManagerImpl

java.lang.Object
org.springframework.security.web.access.channel.ChannelDecisionManagerImpl

All Implemented Interfaces:
  `org.springframework.beans.factory.InitializingBean`, `ChannelDecisionManager`

public class ChannelDecisionManagerImpl extends Object implements ChannelDecisionManager, org.springframework.beans.factory.InitializingBean
Implementation of `ChannelDecisionManager`.

Iterates through each configured `ChannelProcessor`. If a `ChannelProcessor` has any issue with the security of the request, it should cause a redirect, exception or whatever other action is appropriate for the `ChannelProcessor` implementation.

Once any response is committed (ie a redirect is written to the response object), the `ChannelDecisionManagerImpl` will not iterate through any further `ChannelProcessor`s.

The attribute "ANY_CHANNEL" if applied to a particular URL, the iteration through the channel processors will be skipped (see SEC-494, SEC-335).

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ANY_CHANNEL`

## Constructor Summary

Constructors
Constructor
Description
`ChannelDecisionManagerImpl()`

## Method Summary

Modifier and Type
Method
Description
`void`
`afterPropertiesSet()`
`void`
`decide(FilterInvocation invocation, Collection<org.springframework.security.access.ConfigAttribute> config)`
Decided whether the presented `FilterInvocation` provides the appropriate level of channel security based on the requested list of `ConfigAttribute`s.
`protected List<ChannelProcessor>`
`getChannelProcessors()`
`void`
`setChannelProcessors(List<?> channelProcessors)`
`boolean`
`supports(org.springframework.security.access.ConfigAttribute attribute)`
Indicates whether this `ChannelDecisionManager` is able to process the passed `ConfigAttribute`.

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

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

## Field Details

### ANY_CHANNEL

public static final String ANY_CHANNEL

See Also:
  - Constant Field Values

## Constructor Details

### ChannelDecisionManagerImpl

public ChannelDecisionManagerImpl()

## Method Details

### afterPropertiesSet

public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`

### decide

public void decide(FilterInvocation invocation, Collection<org.springframework.security.access.ConfigAttribute> config) throws IOException, jakarta.servlet.ServletException
Description copied from interface: `ChannelDecisionManager`
Decided whether the presented `FilterInvocation` provides the appropriate level of channel security based on the requested list of `ConfigAttribute`s.

Specified by:
  `decide` in interface `ChannelDecisionManager`
Throws:
  `IOException`
  `jakarta.servlet.ServletException`

### getChannelProcessors

protected List<ChannelProcessor> getChannelProcessors()

### setChannelProcessors

public void setChannelProcessors(List<?> channelProcessors)

### supports

public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
Description copied from interface: `ChannelDecisionManager`
Indicates whether this `ChannelDecisionManager` is able to process the passed `ConfigAttribute`.

This allows the `ChannelProcessingFilter` to check every configuration attribute can be consumed by the configured `ChannelDecisionManager`.

Specified by:
  `supports` in interface `ChannelDecisionManager`
Parameters:
  `attribute` - a configuration attribute that has been configured against the `ChannelProcessingFilter`
Returns:
  true if this `ChannelDecisionManager` can support the passed configuration attribute