Package org.atmosphere.util
Class AtmosphereFilterChain
- java.lang.Object
-
- org.atmosphere.util.AtmosphereFilterChain
-
- All Implemented Interfaces:
javax.servlet.FilterChain
public final class AtmosphereFilterChain extends java.lang.Object implements javax.servlet.FilterChainImplementation ofjavax.servlet.FilterChainused to manage the execution of a set of filters for a particular request. When the set of defined filters has all been executed, the next call todoFilter()will execute the servlet'sservice()method itself.- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description static intINCREMENT
-
Constructor Summary
Constructors Constructor Description AtmosphereFilterChain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(FilterConfigImpl filterConfig)Add a filter to the set of filters that will be executed in this chain.voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)Invoke the next filter in this chain, passing the specified request and response.FilterConfigImplgetFilter(int i)javax.servlet.ServletgetServlet()javax.servlet.ServletConfiggetServletConfig()voidinit()Initialize theFiltervoidinvokeFilterChain(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)voidsetServlet(javax.servlet.ServletConfig configImpl, javax.servlet.Servlet servlet)Set the servlet that will be executed at the end of this chain.
-
-
-
Field Detail
-
INCREMENT
public static final int INCREMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletExceptionInitialize theFilter- Throws:
javax.servlet.ServletException
-
invokeFilterChain
public void invokeFilterChain(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws java.io.IOException, javax.servlet.ServletException- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response) throws java.io.IOException, javax.servlet.ServletExceptionInvoke the next filter in this chain, passing the specified request and response. If there are no more filters in this chain, invoke theservice()method of the servlet itself.- Specified by:
doFilterin interfacejavax.servlet.FilterChain- Parameters:
request- The servlet request we are processingresponse- The servlet response we are creating- Throws:
java.io.IOException- if an input/output error occursjavax.servlet.ServletException- if a servlet exception occurs
-
addFilter
public void addFilter(FilterConfigImpl filterConfig)
Add a filter to the set of filters that will be executed in this chain.- Parameters:
filterConfig- The FilterConfig for the servlet to be executed
-
setServlet
public void setServlet(javax.servlet.ServletConfig configImpl, javax.servlet.Servlet servlet)Set the servlet that will be executed at the end of this chain. Set by the mapper filter
-
getFilter
public FilterConfigImpl getFilter(int i)
-
getServlet
public javax.servlet.Servlet getServlet()
-
getServletConfig
public javax.servlet.ServletConfig getServletConfig()
-
destroy
public void destroy()
-
-