Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.catalina.core
Class ApplicationFilterChain  view ApplicationFilterChain download ApplicationFilterChain.java

java.lang.Object
  extended byorg.apache.catalina.core.ApplicationFilterChain
All Implemented Interfaces:
javax.servlet.FilterChain

final class ApplicationFilterChain
extends java.lang.Object
implements javax.servlet.FilterChain

Implementation of javax.servlet.FilterChain used 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 to doFilter() will execute the servlet's service() method itself.

Version:
$Revision: 303523 $ $Date: 2004-11-22 11:35:18 -0500 (Mon, 22 Nov 2004) $

Field Summary
private static java.lang.Class[] classType
          Static class array used when the SecurityManager is turned on and doFilter
private static java.lang.Class[] classTypeUsedInService
          Static class array used when the SecurityManager is turned on and service
private  ApplicationFilterConfig[] filters
          Filters.
static int INCREMENT
           
private  int n
          The int which gives the current number of filters in the chain.
private  int pos
          The int which is used to maintain the current position in the filter chain.
private  javax.servlet.Servlet servlet
          The servlet instance to be executed by this chain.
private static org.apache.catalina.util.StringManager sm
          The string manager for our package.
private  org.apache.catalina.util.InstanceSupport support
          The InstanceSupport instance associated with our Wrapper (used to send "before filter" and "after filter" events.
 
Constructor Summary
ApplicationFilterChain()
          Construct a new chain instance with no defined filters.
 
Method Summary
(package private)  void addFilter(ApplicationFilterConfig filterConfig)
          Add a filter to the set of filters that will be executed in this chain.
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Invoke the next filter in this chain, passing the specified request and response.
private  void internalDoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
(package private)  void release()
          Release references to the filters and wrapper executed by this chain.
(package private)  void setServlet(javax.servlet.Servlet servlet)
          Set the servlet that will be executed at the end of this chain.
(package private)  void setSupport(org.apache.catalina.util.InstanceSupport support)
          Set the InstanceSupport object used for event notifications for this filter chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INCREMENT

public static final int INCREMENT
See Also:
Constant Field Values

filters

private ApplicationFilterConfig[] filters
Filters.


pos

private int pos
The int which is used to maintain the current position in the filter chain.


n

private int n
The int which gives the current number of filters in the chain.


servlet

private javax.servlet.Servlet servlet
The servlet instance to be executed by this chain.


sm

private static final org.apache.catalina.util.StringManager sm
The string manager for our package.


support

private org.apache.catalina.util.InstanceSupport support
The InstanceSupport instance associated with our Wrapper (used to send "before filter" and "after filter" events.


classType

private static java.lang.Class[] classType
Static class array used when the SecurityManager is turned on and doFilter

classTypeUsedInService

private static java.lang.Class[] classTypeUsedInService
Static class array used when the SecurityManager is turned on and service
Constructor Detail

ApplicationFilterChain

public ApplicationFilterChain()
Construct a new chain instance with no defined filters.

Method Detail

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response)
              throws java.io.IOException,
                     javax.servlet.ServletException
Invoke the next filter in this chain, passing the specified request and response. If there are no more filters in this chain, invoke the service() method of the servlet itself.

Specified by:
doFilter in interface javax.servlet.FilterChain

internalDoFilter

private void internalDoFilter(javax.servlet.ServletRequest request,
                              javax.servlet.ServletResponse response)
                       throws java.io.IOException,
                              javax.servlet.ServletException

addFilter

void addFilter(ApplicationFilterConfig filterConfig)
Add a filter to the set of filters that will be executed in this chain.


release

void release()
Release references to the filters and wrapper executed by this chain.


setServlet

void setServlet(javax.servlet.Servlet servlet)
Set the servlet that will be executed at the end of this chain.


setSupport

void setSupport(org.apache.catalina.util.InstanceSupport support)
Set the InstanceSupport object used for event notifications for this filter chain.