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 Type
    Method
    Description
    EnumSet<javax.servlet.DispatcherType>
    The dispatcher type that this Filter should apply to
    javax.servlet.Filter
    Get 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.
    Deprecated.
    default String[]
    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

      Map<String,String> getInitParameters()
      Get Filter initialization parameters.
      Returns:
      a map containing all the Filter initialization parameters
    • getPath

      @Deprecated String getPath()
      Deprecated.
      This method is deprecated, please implement getPaths(). The path that this Filter should apply to
      Returns:
      the path that this Filter should apply to
    • getPaths

      default String[] getPaths()
      The paths that this Filter should apply to
      Returns:
      the paths that this Filter should apply to
    • getDispatcherType

      @Nullable EnumSet<javax.servlet.DispatcherType> getDispatcherType()
      The dispatcher type that this Filter should apply to
      Returns:
      the enumeration of DispatcherTypes that this Filter should apply to