|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequestListener
This is called from with Cocoon.process(Environment)
, before any
requests are passed onto the Processor
and after the request has been
processed. It allows all requests to be logged or monitored.
NB Cocoon does not require an instance of this Component to function, but if
there is one it will be used.
Field Summary | |
---|---|
static String |
ROLE
|
Method Summary | |
---|---|
void |
onRequestEnd(Environment environment)
This method is called when a request has completed. |
void |
onRequestException(Environment environment,
Throwable throwable)
This method is called when an exception has occurred processing the request. |
void |
onRequestStart(Environment environment)
In this method you can call, for example: Request req=ObjectModelHelper.getRequest(env.getObjectModel());
And then, you could use the following:
req.getRequestURI()
req.getQueryString()
req.getSession().getId()
req.getLocale().getLanguage().toString()
|
Field Detail |
---|
static final String ROLE
Method Detail |
---|
void onRequestStart(Environment environment)
In this method you can call, for example:
Request req=ObjectModelHelper.getRequest(env.getObjectModel());
And then, you could use the following:
environment
- as supplied to Processor.process(Environment)
from within Cocoon.process(Environment)
.void onRequestEnd(Environment environment)
This method is called when a request has completed. This method is called before the response is committed.
environment
- as supplied to Processor.process(Environment)
from within Cocoon.process(Environment)
.void onRequestException(Environment environment, Throwable throwable)
This method is called when an exception has occurred processing the request.
environment
- as supplied to Processor.process(Environment)
from within Cocoon.process(Environment)
.throwable
- the error that occurred processing the request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |