filters
Class ExampleFilter

java.lang.Object
  extended by filters.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:

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
result - The servlet response we are creating
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.

Overrides:
toString in class Object


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.