Class CharacterEncodingFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.web.filter.CharacterEncodingFilter
net.shibboleth.shared.spring.servlet.impl.CharacterEncodingFilter
- All Implemented Interfaces:
Filter,ChainableFilter,Aware,BeanNameAware,DisposableBean,InitializingBean,EnvironmentAware,EnvironmentCapable,Ordered,ServletContextAware
Adapts Spring filter into a chainable/conditional one.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.shared.spring.servlet.ChainableFilter
ChainableFilter.FilterOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Predicate<ServletRequest>Whether filter should run or not.Fields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) Get the condition to control activation of this filter.intgetOrder()voidsetActivationCondition(Predicate<ServletRequest> condition) Set the condition to control activation of this filter.Methods inherited from class org.springframework.web.filter.CharacterEncodingFilter
getEncoding, isForceRequestEncoding, isForceResponseEncoding, setEncoding, setForceEncoding, setForceRequestEncoding, setForceResponseEncodingMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
activationCondition
Whether filter should run or not.
-
-
Constructor Details
-
CharacterEncodingFilter
public CharacterEncodingFilter()Constructor.
-
-
Method Details
-
getActivationCondition
Get the condition to control activation of this filter.- Returns:
- condition
-
setActivationCondition
Set the condition to control activation of this filter.- Parameters:
condition- run condition
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceChainableFilter- Specified by:
getOrderin interfaceOrdered
-
doFilterInternal
protected void doFilterInternal(@Nonnull HttpServletRequest request, @Nonnull HttpServletResponse response, @Nonnull FilterChain filterChain) throws ServletException, IOException - Overrides:
doFilterInternalin classCharacterEncodingFilter- Throws:
ServletExceptionIOException
-