To use this class in your {@link WebApplication} simply override the {@link WebApplication#newRequestCycleProcessor} method in your own {@link WebApplication}.
The responsibility of the {@link JamonAwareWebRequestCycleProcessor} is to create the label of the {@link Monitor}currently in use by the {@link JamonMonitoredWebRequestCycle}. 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 {@link JamonMonitoredWebRequestCycle}. If used by itself an {@link IllegalStateException} will be thrown.
Implementation limitations:
Only if the {@link WebRequestCycle} comes from an {@link IBookmarkablePageRequestTarget} or an{@link IListenerInterfaceRequestTarget} and the eventual target of the {@link WebRequestCycle} isan {@link IPageRequestTarget} or an {@link IBookmarkablePageRequestTarget} the Monitors are created.If you want to support more types of targets you can extend this class and implement the methods {@link #doResolveSourceLabel(IRequestTarget,JamonMonitoredWebRequestCycle)} and {@link #doResolveTargetLabel(IRequestTarget,JamonMonitoredWebRequestCycle)}.
|
|