|
|||||||||
| Home >> All >> [ filters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
filters
Class ExampleFilter

java.lang.Objectfilters.ExampleFilter
- All Implemented Interfaces:
- javax.servlet.Filter
- public final class ExampleFilter
- extends java.lang.Object
- implements javax.servlet.Filter
- extends java.lang.Object
Example filter that can be attached to either an individual servlet or to a URL pattern. This filter performs the following functions:
- Attaches itself as a request attribute, under the attribute name
defined by the value of the
attributeinitialization parameter. - Calculates the number of milliseconds required to perform the servlet processing required by this request, including any subsequently defined filters, and logs the result to the servlet context log for this application.
- Version:
- $Revision: 267129 $ $Date: 2004-03-18 11:40:35 -0500 (Thu, 18 Mar 2004) $
| Field Summary | |
private java.lang.String |
attribute
The request attribute name under which we store a reference to ourself. |
private javax.servlet.FilterConfig |
filterConfig
The filter configuration object we are associated with. |
| Constructor Summary | |
ExampleFilter()
|
|
| Method Summary | |
void |
destroy()
Take this filter out of service. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Time the processing that is performed by all subsequent filters in the current filter stack, including the ultimately invoked servlet. |
void |
init(javax.servlet.FilterConfig filterConfig)
Place this filter into service. |
java.lang.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 |
| Field Detail |
attribute
private java.lang.String attribute
- The request attribute name under which we store a reference to ourself.
filterConfig
private javax.servlet.FilterConfig filterConfig
- The filter configuration object we are associated with. If this value
is null, this filter instance is not currently configured.
| Constructor Detail |
ExampleFilter
public ExampleFilter()
| Method Detail |
destroy
public void destroy()
- Take this filter out of service.
- Specified by:
destroyin interfacejavax.servlet.Filter
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
- Time the processing that is performed by all subsequent filters in the
current filter stack, including the ultimately invoked servlet.
- Specified by:
doFilterin interfacejavax.servlet.Filter
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
- Place this filter into service.
- Specified by:
initin interfacejavax.servlet.Filter
toString
public java.lang.String toString()
- Return a String representation of this object.
|
|||||||||
| Home >> All >> [ filters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
filters.ExampleFilter