public class JamonAwareRequestCycleListener
extends org.apache.wicket.request.cycle.AbstractRequestCycleListener
To use this class in your WebApplication simply override the WebApplication.init()
method in your own WebApplication.
The responsibility of the JamonAwareRequestCycleListener is to create the label of the
Monitor currently in use by the JamonMonitoredRequestCycle. The label consists of
the source from where a request originated from and the target to where it will resolve to.
This class can only be used in combination with JamonMonitoredRequestCycle. If used by
itself an IllegalStateException will be thrown.
Implementation limitations:
Only if the RequestCycle comes from an BookmarkablePageRequestHandler or an
ListenerRequestHandler and the eventual target of the
RequestCycle is an PageRequestHandler or an
BookmarkablePageRequestHandler the Monitors are created. If you want to support more
types of targets you can extend this class and implement the methods
#doResolveSourceLabel(IRequestHandler, JamonMonitoredRequestCycle) and
#doResolveTargetLabel(IRequestHandler, JamonMonitoredRequestCycle).
| Constructor and Description |
|---|
JamonAwareRequestCycleListener(org.apache.wicket.Application app,
boolean includeSourceNameInMonitorLabel) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doResolveSourceLabel(org.apache.wicket.request.IRequestHandler requestHandler,
org.apache.wicket.request.cycle.RequestCycle cycle)
Subclasses should implement this method if they want to monitor more types of
IRequestHandlers than this JamonAwareRequestCycleListener supports. |
protected void |
doResolveTargetLabel(org.apache.wicket.request.IRequestHandler requestHandler,
org.apache.wicket.request.cycle.RequestCycle cycle)
Subclasses should implement this method if they want to monitor more types of
IRequestHandlers than this JamonAwareRequestCycleListener supports. |
void |
onBeginRequest(org.apache.wicket.request.cycle.RequestCycle cycle) |
void |
onEndRequest(org.apache.wicket.request.cycle.RequestCycle cycle) |
void |
onRequestHandlerExecuted(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler) |
void |
onRequestHandlerResolved(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler) |
void |
onRequestHandlerScheduled(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler) |
public JamonAwareRequestCycleListener(org.apache.wicket.Application app,
boolean includeSourceNameInMonitorLabel)
public void onBeginRequest(org.apache.wicket.request.cycle.RequestCycle cycle)
onBeginRequest in interface org.apache.wicket.request.cycle.IRequestCycleListeneronBeginRequest in class org.apache.wicket.request.cycle.AbstractRequestCycleListenerpublic void onEndRequest(org.apache.wicket.request.cycle.RequestCycle cycle)
onEndRequest in interface org.apache.wicket.request.cycle.IRequestCycleListeneronEndRequest in class org.apache.wicket.request.cycle.AbstractRequestCycleListenerpublic void onRequestHandlerResolved(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler)
onRequestHandlerResolved in interface org.apache.wicket.request.cycle.IRequestCycleListeneronRequestHandlerResolved in class org.apache.wicket.request.cycle.AbstractRequestCycleListenerpublic void onRequestHandlerExecuted(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler)
onRequestHandlerExecuted in interface org.apache.wicket.request.cycle.IRequestCycleListeneronRequestHandlerExecuted in class org.apache.wicket.request.cycle.AbstractRequestCycleListenerpublic void onRequestHandlerScheduled(org.apache.wicket.request.cycle.RequestCycle cycle,
org.apache.wicket.request.IRequestHandler handler)
onRequestHandlerScheduled in interface org.apache.wicket.request.cycle.IRequestCycleListeneronRequestHandlerScheduled in class org.apache.wicket.request.cycle.AbstractRequestCycleListenerprotected void doResolveSourceLabel(org.apache.wicket.request.IRequestHandler requestHandler,
org.apache.wicket.request.cycle.RequestCycle cycle)
IRequestHandlers than this JamonAwareRequestCycleListener supports. See
JamonAwareRequestCycleListener javadoc for the currently supported types. Besides
this method subclasses should also consider implementing
#doResolveTargetLabel(IRequestHandler, JamonMonitoredRequestCycle). JamonMonitoredRequestCycle: JamonMonitoredRequestCycle#comesFromPage(Class)JamonMonitoredRequestCycle#setSource(String)requestHandler - The request target of where the request originated from.cycle - The JamonMonitoredRequestCycle.protected void doResolveTargetLabel(org.apache.wicket.request.IRequestHandler requestHandler,
org.apache.wicket.request.cycle.RequestCycle cycle)
IRequestHandlers than this JamonAwareRequestCycleListener supports. See
JamonAwareRequestCycleListener javadoc for the currently supported types. Besides
this method subclasses should also consider implementing
#doResolveSourceLabel(IRequestHandler, JamonMonitoredRequestCycle). JamonMonitoredRequestCycle#setTarget(Class) on the given
JamonMonitoredRequestCycle. requestHandler - The request target of where the request will resolve to.cycle - The JamonMonitoredRequestCycle.Copyright © 2017. All rights reserved.