|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.loggers.LogEvents
Log all hook events during tomcat execution. Use debug>0 to log addContainer ( since this generates a lot of output )
| Fields inherited from class org.apache.tomcat.core.BaseInterceptor |
cm, ct, ctx, debug, DECLINED, loghelper, OK |
| Constructor Summary | |
LogEvents()
|
|
| Method Summary | |
void |
addContainer(Container ct)
Notify that certain properties are defined for a URL pattern. |
void |
addContext(ContextManager cm,
Context ctx)
Called when a context is added to a CM |
void |
addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor i)
Hook called when a new interceptor is added. |
void |
addMapping(Context ctx,
java.lang.String path,
Handler servlet)
|
void |
addSecurityConstraint(Context ctx,
java.lang.String[] path,
java.lang.String[] methods,
java.lang.String transport,
java.lang.String[] roles)
|
void |
addServlet(Context ctx,
Handler sw)
Notify when a new servlet is added |
int |
afterBody(Request request,
Response response)
Called after the output stream is closed ( either by servlet or automatically at end of service ). |
int |
authenticate(Request request,
Response response)
This callback is used to extract and verify the user identity and credentials. |
int |
authorize(Request request,
Response response,
java.lang.String[] reqRoles)
Will check if the current ( authenticated ) user is authorized to access a resource, by checking if it have one of the required roles. |
int |
beforeBody(Request request,
Response response)
Called before the first body write, and before sending the headers. |
int |
beforeCommit(Request request,
Response response)
Called before the output buffer is commited. |
void |
contextInit(Context ctx)
Notify when a context is initialized. |
int |
contextMap(Request request)
Will detect the context path for a request. |
void |
contextShutdown(Context ctx)
Called when a context is stoped, before removeContext. |
void |
engineInit(ContextManager cm)
Called when the ContextManger is started |
void |
engineShutdown(ContextManager cm)
Called before the ContextManager is stoped. |
void |
engineStart(ContextManager cm)
Notify that the server is ready and able to process requests |
void |
engineState(ContextManager cm,
int state)
Notifies the module that the server changed it's state. |
int |
handleError(Request request,
Response response,
java.lang.Throwable t)
This callback is called whenever an exception happen. |
int |
newSessionRequest(Request req,
Response res)
|
int |
postRequest(Request request,
Response response)
Experimental hook: called after the request is finished, before returning to the caller. |
int |
postService(Request request,
Response response)
Called after service method ends. |
void |
postServletDestroy(Context ctx,
Handler sw)
|
void |
postServletInit(Context ctx,
Handler sw)
|
int |
preService(Request request,
Response response)
Called before service method is invoked. |
void |
preServletDestroy(Context ctx,
Handler sw)
Servlet Destroy notification |
void |
preServletInit(Context ctx,
Handler sw)
Servlet Init notification |
int |
registerHooks(Hooks hooks,
ContextManager cm,
Context ctx)
Special method for self-registered hooks, intended to support a mechanism similar with Apache2.0 and further extensibility without interface changes. |
void |
removeContext(ContextManager cm,
Context ctx)
Called when a context is removed from a CM |
void |
removeMapping(Context ctx,
java.lang.String path)
|
void |
removeServlet(Context ctx,
Handler sw)
Notify when a servlet is removed from context |
int |
requestMap(Request request)
Handle mappings inside a context. |
void |
setEnabled(boolean b)
|
| Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addHandler, addSecurityConstraint, contextState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, log, log, log, log, postReadRequest, reload, removeContainer, 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 |
| Constructor Detail |
public LogEvents()
| Method Detail |
public void setEnabled(boolean b)
public int registerHooks(Hooks hooks,
ContextManager cm,
Context ctx)
BaseInterceptorregisterHooks in class BaseInterceptorpublic int requestMap(Request request)
BaseInterceptorrequestMap in class BaseInterceptorpublic int contextMap(Request request)
BaseInterceptorcontextMap in class BaseInterceptor
public int preService(Request request,
Response response)
BaseInterceptorpreService in class BaseInterceptor
public int authenticate(Request request,
Response response)
BaseInterceptorauthenticate in class BaseInterceptor
public int authorize(Request request,
Response response,
java.lang.String[] reqRoles)
BaseInterceptorauthorize in class BaseInterceptor
public int beforeBody(Request request,
Response response)
BaseInterceptorbeforeBody in class BaseInterceptor
public int beforeCommit(Request request,
Response response)
BaseInterceptorbeforeCommit in class BaseInterceptor
public int afterBody(Request request,
Response response)
BaseInterceptorafterBody in class BaseInterceptor
public int postRequest(Request request,
Response response)
BaseInterceptorpostRequest in class BaseInterceptor
public int handleError(Request request,
Response response,
java.lang.Throwable t)
BaseInterceptorhandleError in class BaseInterceptor
public int postService(Request request,
Response response)
BaseInterceptorpostService in class BaseInterceptor
public int newSessionRequest(Request req,
Response res)
public void contextInit(Context ctx)
throws TomcatException
BaseInterceptorcontextInit in class BaseInterceptororg.apache.tomcat.core.BaseInterceptorIf - the interceptor throws exception the context will
not be initialized ( state==NEW or ADDED or DISABLED ).
public void contextShutdown(Context ctx)
throws TomcatException
BaseInterceptorcontextShutdown in class BaseInterceptor
public void addServlet(Context ctx,
Handler sw)
throws TomcatException
public void removeServlet(Context ctx,
Handler sw)
throws TomcatException
public void addMapping(Context ctx,
java.lang.String path,
Handler servlet)
throws TomcatException
public void removeMapping(Context ctx,
java.lang.String path)
throws TomcatException
public void addSecurityConstraint(Context ctx,
java.lang.String[] path,
java.lang.String[] methods,
java.lang.String transport,
java.lang.String[] roles)
throws TomcatException
public void addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor i)
throws TomcatException
BaseInterceptoraddInterceptor in class BaseInterceptororg.apache.tomcat.core.BaseInterceptorcm - the serverctx - not null if this is a local interceptori - the new added interceptorTomcatException - The module will not be added if any
module throws an exception.
public void engineInit(ContextManager cm)
throws TomcatException
engineInit in class BaseInterceptororg.apache.tomcat.core.BaseInterceptorTomcatException - The module will not be added if any
exception is thrown by engineInit.
public void engineShutdown(ContextManager cm)
throws TomcatException
engineShutdown in class BaseInterceptororg.apache.tomcat.core.BaseInterceptorIf - any exception is reported, the module will be removed.
XXX (?)
public void addContext(ContextManager cm,
Context ctx)
throws TomcatException
addContext in class BaseInterceptor
public void addContainer(Container ct)
throws TomcatException
BaseInterceptoraddContainer in class BaseInterceptor
public void engineState(ContextManager cm,
int state)
throws TomcatException
BaseInterceptorengineState in class BaseInterceptor
public void engineStart(ContextManager cm)
throws TomcatException
BaseInterceptorengineStart in class BaseInterceptor
public void removeContext(ContextManager cm,
Context ctx)
throws TomcatException
removeContext in class BaseInterceptor
public void preServletInit(Context ctx,
Handler sw)
throws TomcatException
preServletInit in class BaseInterceptor
public void postServletInit(Context ctx,
Handler sw)
throws TomcatException
postServletInit in class BaseInterceptor
public void preServletDestroy(Context ctx,
Handler sw)
throws TomcatException
preServletDestroy in class BaseInterceptor
public void postServletDestroy(Context ctx,
Handler sw)
throws TomcatException
postServletDestroy in class BaseInterceptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||