com.atlassian.plugin.servlet.filter
Class ServletFilterModuleContainerFilter

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

public class ServletFilterModuleContainerFilter
extends java.lang.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 Summary
ServletFilterModuleContainerFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
protected  javax.servlet.FilterConfig getFilterConfig()
           
protected  FilterLocation getFilterLocation()
           
protected  ServletModuleManager getServletModuleManager()
          Retrieve the DefaultServletModuleManager from your container framework.
 void init(javax.servlet.FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletFilterModuleContainerFilter

public ServletFilterModuleContainerFilter()
Method Detail

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 java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.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()


Copyright © 2012 Atlassian. All Rights Reserved.