org.apache.tomcat.modules.loggers
Class AccountingInterceptor
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.loggers.AccountingInterceptor
- public class AccountingInterceptor
- extends BaseInterceptor
Time counting.
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addInterceptor, addSecurityConstraint, authorize, contextInit, contextShutdown, contextState, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postServletDestroy, postServletInit, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACC_PRE_CMAP
public static final int ACC_PRE_CMAP
ACC_PRE_RMAP
public static final int ACC_PRE_RMAP
ACC_POST_MAP
public static final int ACC_POST_MAP
ACC_PRE_SERVICE
public static final int ACC_PRE_SERVICE
ACC_POST_SERVICE
public static final int ACC_POST_SERVICE
ACC_IN_OUT
public static final int ACC_IN_OUT
ACC_OUT_COUNT
public static final int ACC_OUT_COUNT
COUNTERS_COUNT
public static final int COUNTERS_COUNT
AccountingInterceptor
public AccountingInterceptor()
setTrace
public void setTrace(java.lang.String file)
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- Called when the ContextManger is started
- Overrides:
engineInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
TomcatException
- The module will not be added if any
exception is thrown by engineInit.
requestMap
public int requestMap(Request request)
- Description copied from class:
BaseInterceptor
- Handle mappings inside a context.
You are required to respect the mappings in web.xml.
- Overrides:
requestMap
in class BaseInterceptor
contextMap
public int contextMap(Request request)
- Description copied from class:
BaseInterceptor
- Will detect the context path for a request.
It need to set: context, contextPath, lookupPath
A possible use for this would be a "user-home" interceptor
that will implement ~costin servlets ( add and map them at run time).
- Overrides:
contextMap
in class BaseInterceptor
authenticate
public int authenticate(Request request,
Response response)
- Description copied from class:
BaseInterceptor
- This callback is used to extract and verify the user identity
and credentials.
It will set the RemoteUser field if it can authenticate.
The auth event is generated by a user asking for the remote
user field of by tomcat if a request requires authenticated
id.
- Overrides:
authenticate
in class BaseInterceptor
authorize
public int authorize(Request request,
Response response)
preService
public int preService(Request request,
Response response)
- Description copied from class:
BaseInterceptor
- Called before service method is invoked.
- Overrides:
preService
in class BaseInterceptor
beforeBody
public int beforeBody(Request rrequest,
Response response)
- Description copied from class:
BaseInterceptor
- Called before the first body write, and before sending
the headers. The interceptor have a chance to change the
output headers.
Before body allows you do do various
actions before the first byte of the response is sent. After all
those callbacks are called tomcat may send the status and headers
- Overrides:
beforeBody
in class BaseInterceptor
beforeCommit
public int beforeCommit(Request request,
Response response)
- Description copied from class:
BaseInterceptor
- Called before the output buffer is commited.
- Overrides:
beforeCommit
in class BaseInterceptor
afterBody
public int afterBody(Request request,
Response response)
- Description copied from class:
BaseInterceptor
- Called after the output stream is closed ( either by servlet
or automatically at end of service ).
It is called after the servlet finished
sending the response ( either closeing the stream or ending ). You
can deal with connection reuse or do other actions
- Overrides:
afterBody
in class BaseInterceptor
postService
public int postService(Request request,
Response response)
- Description copied from class:
BaseInterceptor
- Called after service method ends. Log is a particular use.
- Overrides:
postService
in class BaseInterceptor
Copyright © 2001 Apache Software Foundation. All Rights Reserved.