filters
Class ExampleFilter

java.lang.Object
  extended byfilters.ExampleFilter
All Implemented Interfaces:
Filter

public final class ExampleFilter
extends Object
implements Filter

Example filter that can be attached to either an individual servlet or to a URL pattern. This filter performs the following functions:

Version:
$Revision: 267129 $ $Date: 2004-03-18 08:40:35 -0800 (Thu, 18 Mar 2004) $
Author:
Craig McClanahan

Constructor Summary
ExampleFilter()
           
 
Method Summary
 void destroy()
          Take this filter out of service.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet.
 void init(FilterConfig filterConfig)
          Place this filter into service.
 String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExampleFilter

public ExampleFilter()
Method Detail

destroy

public void destroy()
Take this filter out of service.

Specified by:
destroy in interface Filter

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet.

Specified by:
doFilter in interface Filter
Parameters:
request - The servlet request we are processing
chain - The filter chain we are processing
Throws:
IOException - if an input/output error occurs
ServletException - if a servlet error occurs

init

public void init(FilterConfig filterConfig)
          throws ServletException
Place this filter into service.

Specified by:
init in interface Filter
Parameters:
filterConfig - The filter configuration object
Throws:
ServletException

toString

public String toString()
Return a String representation of this object.



Copyright © 2006 Apache Software Foundation. All Rights Reserved.