org.apache.catalina.valves
Class RequestListenerValve

java.lang.Object
  |
  +--org.apache.catalina.valves.ValveBase
        |
        +--org.apache.catalina.valves.RequestListenerValve
All Implemented Interfaces:
Contained, Valve

public class RequestListenerValve
extends ValveBase

Implementation of a Valve that handles the servlet request lifecycle events (initilization and destroy).

This Valve should be attached to a Context.

WARNING: This valve is necessary for Servlet 2.4 API compliance.

Version:
$Revision: 1.1 $ $Date: 2002/08/09 02:07:12 $
Author:
Justyna Horwat

Field Summary
protected static StringManager sm
          The StringManager for this package.
 
Fields inherited from class org.apache.catalina.valves.ValveBase
container, debug, info
 
Constructor Summary
RequestListenerValve()
           
 
Method Summary
 java.lang.String getInfo()
          Return descriptive information about this Valve implementation.
 void invoke(Request request, Response response, ValveContext context)
          Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
protected  void log(java.lang.String message)
          Log a message on the Logger associated with our Container (if any).
protected  void log(java.lang.String message, java.lang.Throwable throwable)
          Log a message on the Logger associated with our Container (if any).
 java.lang.String toString()
          Return a String rendering of this object.
 
Methods inherited from class org.apache.catalina.valves.ValveBase
getContainer, getDebug, setContainer, setDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sm

protected static StringManager sm
The StringManager for this package.

Constructor Detail

RequestListenerValve

public RequestListenerValve()
Method Detail

getInfo

public java.lang.String getInfo()
Return descriptive information about this Valve implementation.

Specified by:
getInfo in interface Valve
Overrides:
getInfo in class ValveBase

invoke

public void invoke(Request request,
                   Response response,
                   ValveContext context)
            throws java.io.IOException,
                   javax.servlet.ServletException
Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.

Specified by:
invoke in interface Valve
Specified by:
invoke in class ValveBase
Parameters:
request - The servlet request to be processed
response - The servlet response to be created
context - The valve context used to invoke the next valve in the current processing pipeline
Throws:
java.io.IOException - if an input/output error occurs
javax.servlet.ServletException - if a servlet error occurs

toString

public java.lang.String toString()
Return a String rendering of this object.

Overrides:
toString in class java.lang.Object

log

protected void log(java.lang.String message)
Log a message on the Logger associated with our Container (if any).

Parameters:
message - Message to be logged

log

protected void log(java.lang.String message,
                   java.lang.Throwable throwable)
Log a message on the Logger associated with our Container (if any).

Parameters:
message - Message to be logged
throwable - Associated exception


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.