public class JamonMonitoredRequestCycleContext extends Object
To use this class simply create an instance and register it to request cycle. As a shortcut to
register context in request cycle you can use registerTo(RequestCycle, boolean)
The responsibility of the JamonMonitoredRequestCycleContext is to add a monitor for all
actions that will cause pages or parts of pages to be rendered.
The labels of the Monitors come in these formats:
JamonMonitoredRequestCycleContext has its property
includeSourceNameInMonitorLabel set to true.JamonMonitoredRequestCycleContext has its property
includeSourceNameInMonitorLabel set to false.JamonAdminPage is excluded from the Monitors.
| Constructor and Description |
|---|
JamonMonitoredRequestCycleContext(boolean includeSourceNameInMonitorLabel)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
comesFromPage(Class<? extends org.apache.wicket.request.component.IRequestablePage> clazz)
From which Page did the request come from? This is needed for creating the Monitor label.
|
void |
dontMonitorThisRequest() |
static JamonMonitoredRequestCycleContext |
get(org.apache.wicket.request.cycle.RequestCycle cycle) |
static void |
registerTo(org.apache.wicket.request.cycle.RequestCycle cycle,
boolean includeSourceNameInMonitorLabel) |
void |
setSource(String source)
Sets the
source. |
void |
setTarget(Class<? extends org.apache.wicket.request.component.IRequestablePage> destination)
Set the
target. |
void |
startTimeRequest() |
void |
stopTimeRequest() |
public JamonMonitoredRequestCycleContext(boolean includeSourceNameInMonitorLabel)
includeSourceNameInMonitorLabel - whether or not to include the name of the source in the Monitors label.public static void registerTo(org.apache.wicket.request.cycle.RequestCycle cycle,
boolean includeSourceNameInMonitorLabel)
public static JamonMonitoredRequestCycleContext get(org.apache.wicket.request.cycle.RequestCycle cycle)
public final void startTimeRequest()
public final void stopTimeRequest()
public void setSource(String source)
source.source - The name of the source where the request originated from.public void setTarget(Class<? extends org.apache.wicket.request.component.IRequestablePage> destination)
target.destination - The name of the page that was rendered.public void comesFromPage(Class<? extends org.apache.wicket.request.component.IRequestablePage> clazz)
clazz - public final void dontMonitorThisRequest()
Copyright © 2017. All rights reserved.