|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MonitoringProvider
Provider for "monitoring" calls.
Methods are called right before some event happens, statistics are not generated by default, you have to registerMonitoringProvider via MonitoringProviderAdapter
and compute them by yourself. Id parameter is context ID, which is equal for events
generated from processing single request (starts with requestStart and ends with
requestEnd). Context IDs might be reused.
RequestStart and requestEnd are called during processing every request. Other methods
might not be called, for example resource method might not be found.
Metrics examples:
Total Invocation count
- count number of requestStart calls
Average Invocation Count
- Total invocation count / server uptime
Last Invoke Clock Time
- remember when requestStart was called
Total Execution Time
- ? what exactly is this supposed to mean ?
- remember time period between reqestStart and requestEnd call
(and add it to some total sum)
Average Time per invoke
- Total Execution Time / Total Invocation count?
Execution Time Low
- shortest invocation time
Execution Time High
- longest invocation time
Total Error Count
- count number of requestEnd calls
Average Error Count per Period
- Total Error Count / Period
Last Error Detail
- remember last Exception from requestEnd call
Last Error Clock Time
- remember when error(Exception ex) was called
| Method Summary | |
|---|---|
void |
error(long id,
java.lang.Throwable ex)
Called when exception is thrown during dispatching and not mapped via ExceptionMapper. |
void |
requestEnd(long id,
javax.servlet.http.HttpServletResponse response)
Called when Jersey has finalized response and handles it back to container. |
void |
requestResourceMethodPreDispatch(long id,
AbstractResourceMethod method)
Called right before resource method invocation. |
void |
requestStart(long id,
javax.servlet.http.HttpServletRequest request)
Called when Jersey receives request from lower layer. |
void |
requestSubResourcePreDispatch(long id,
java.lang.Class subResource)
Called when Jersey finds suitable sub resource which will be used during request processing. |
| Method Detail |
|---|
void requestStart(long id,
javax.servlet.http.HttpServletRequest request)
id - Context ID.request - request instance. It MUST NOT be modified.
void requestSubResourcePreDispatch(long id,
java.lang.Class subResource)
id - Context ID.subResource - class representing matched sub resource.
void requestResourceMethodPreDispatch(long id,
AbstractResourceMethod method)
id - Context ID.method - method used for dispatching. It MUST NOT be modified.
void error(long id,
java.lang.Throwable ex)
id - Context ID.ex - thrown exception.
void requestEnd(long id,
javax.servlet.http.HttpServletResponse response)
id - Context ID.response - response instance. It MUST NOT be modified.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||