Java Simon 3.5.0

org.javasimon.javaee.reqreporter
Class PlainRequestReporter

java.lang.Object
  extended by org.javasimon.javaee.reqreporter.PlainRequestReporter
All Implemented Interfaces:
RequestReporter

public class PlainRequestReporter
extends Object
implements RequestReporter

Reports the request with split lenght and list of all splits. Report is sent through Manager.message(String). Following aspects of the class can be overridden:

Author:
Richard "Virgo" Richter

Constructor Summary
PlainRequestReporter()
           
 
Method Summary
protected  void reportMessage(String message)
          Reports the prepared message through the method Manager.message(String) - can be overridden to emit the message to log/console/etc.
 void reportRequest(javax.servlet.http.HttpServletRequest request, Split requestSplit, List<Split> splits)
          Reports request that exceeds the threshold.
 void setSimonServletFilter(SimonServletFilter simonServletFilter)
          Called by initialization after the instance creation.
protected  boolean shouldBeAddedSplit(Split split)
          Decides whether split should be included in the report - by default all are included.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainRequestReporter

public PlainRequestReporter()
Method Detail

reportRequest

public void reportRequest(javax.servlet.http.HttpServletRequest request,
                          Split requestSplit,
                          List<Split> splits)
Description copied from interface: RequestReporter
Reports request that exceeds the threshold.

Specified by:
reportRequest in interface RequestReporter
Parameters:
request - offending HTTP request
requestSplit - split measuring the offending request
splits - list of all splits started for this request

reportMessage

protected void reportMessage(String message)
Reports the prepared message through the method Manager.message(String) - can be overridden to emit the message to log/console/etc.

Parameters:
message - prepared message with report

shouldBeAddedSplit

protected boolean shouldBeAddedSplit(Split split)
Decides whether split should be included in the report - by default all are included.

Parameters:
split - tested Split
Returns:
true, if the split should be reported in the list

setSimonServletFilter

public void setSimonServletFilter(SimonServletFilter simonServletFilter)
Description copied from interface: RequestReporter
Called by initialization after the instance creation. Useful when Manager is needed (SimonServletFilter.getManager()) and possibly for other scenarios.

Specified by:
setSimonServletFilter in interface RequestReporter

Java Simon 3.5.0

Copyright © 2014. All rights reserved.