Interface ServletFilterHolder
- All Known Subinterfaces:
Authenticator
- All Known Implementing Classes:
AllowAllAuthenticator,AnonymousAuthenticator,JettyBindings.QosFilterHolder,ResponseHeaderFilterHolder,StandardResponseHeaderFilterHolder,TaskIdResponseHeaderFilterHolder,TrustedDomainAuthenticator
public interface ServletFilterHolder
A ServletFilterHolder is a class that holds all of the information required to attach a Filter to a Servlet.
This largely exists just to make it possible to add Filters via Guice/DI and shouldn't really exist
anywhere that is not initialization code.
Note that some of the druid nodes (router for example) use async servlets and your filter
implementation should be able to handle those requests properly.
-
Method Summary
Modifier and TypeMethodDescriptionEnumSet<javax.servlet.DispatcherType>The dispatcher type that this Filter should apply tojavax.servlet.FilterGet the Filter object that should be added to the servlet.Class<? extends javax.servlet.Filter>Get the class of the Filter object that should be added to the servlet.Get Filter initialization parameters.getPath()Deprecated.default String[]getPaths()The paths that this Filter should apply to
-
Method Details
-
getFilter
javax.servlet.Filter getFilter()Get the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilterClass method. That is, one of them should return null and the other should return an actual value.- Returns:
- The Filter object to be added to the servlet
-
getFilterClass
Class<? extends javax.servlet.Filter> getFilterClass()Get the class of the Filter object that should be added to the servlet. This method is considered "mutually exclusive" from the getFilter method. That is, one of them should return null and the other should return an actual value.- Returns:
- The class of the Filter object to be added to the servlet
-
getInitParameters
Get Filter initialization parameters.- Returns:
- a map containing all the Filter initialization parameters
-
getPath
Deprecated.This method is deprecated, please implementgetPaths(). The path that this Filter should apply to- Returns:
- the path that this Filter should apply to
-
getPaths
The paths that this Filter should apply to- Returns:
- the paths that this Filter should apply to
-
getDispatcherType
The dispatcher type that this Filter should apply to- Returns:
- the enumeration of DispatcherTypes that this Filter should apply to
-