Class ServletFilterModuleContainerFilter

java.lang.Object
com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter
All Implemented Interfaces:
javax.servlet.Filter

public class ServletFilterModuleContainerFilter extends Object implements javax.servlet.Filter
Applications need to create a concrete subclass of this for use in their filter stack. This filters responsiblity is to retrieve the filters to be applied to the request from the ServletModuleManager and build a FilterChain from them. Once all the filters in the chain have been applied to the request, this filter returns control to the main chain.

There is one init parameters that must be configured for this filter, the "location" parameter. It can be one of "top", "middle" or "bottom". A filter with a "top" location must appear before the filter with a "middle" location which must appear before a filter with a "bottom" location. Where any other application filters lie in the filter stack is completely up to the application.

Since:
2.1.0
  • Constructor Details

    • ServletFilterModuleContainerFilter

      public ServletFilterModuleContainerFilter()
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter
    • getServletModuleManager

      protected ServletModuleManager getServletModuleManager()
      Retrieve the DefaultServletModuleManager from your container framework. Uses the ServletContextServletModuleManagerAccessor by default.
    • getFilterConfig

      protected final javax.servlet.FilterConfig getFilterConfig()
    • getFilterLocation

      protected final FilterLocation getFilterLocation()