public class PlainRequestReporter extends Object implements RequestReporter
Manager.message(String)
. Following aspects of the class can be overridden:
reportMessage(String)
,shouldBeAddedSplit(org.javasimon.Split)
.Constructor and Description |
---|
PlainRequestReporter() |
Modifier and Type | Method and Description |
---|---|
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.
|
public PlainRequestReporter()
public void reportRequest(javax.servlet.http.HttpServletRequest request, Split requestSplit, List<Split> splits)
RequestReporter
reportRequest
in interface RequestReporter
request
- offending HTTP requestrequestSplit
- split measuring the offending requestsplits
- list of all splits started for this requestprotected void reportMessage(String message)
Manager.message(String)
- can be overridden
to emit the message to log/console/etc.message
- prepared message with reportprotected boolean shouldBeAddedSplit(Split split)
split
- tested Splitpublic void setSimonServletFilter(SimonServletFilter simonServletFilter)
RequestReporter
Manager
is needed
(SimonServletFilter.getManager()
) and possibly for other scenarios.setSimonServletFilter
in interface RequestReporter
Copyright © 2019. All rights reserved.