|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PayloadInfo
A payload info represents a verbose description that can be added added to the current call stack together with associated timing information. Payload infos are created with factory methods in the interceptor class and can have optional memento objects that help you keep additonal state if the payload info is handled in different contexts, such as interception entry and interception exit.
A typical example for payload is the SQL string that is displayed by the built-in JDBC service call measurement.
Interceptor.createPayloadInfo(String)
,
Interceptor.createPayloadInfo(String, Object)
Method Summary | |
---|---|
void |
addToCallTree(boolean checkDuplicate,
boolean useCap)
Adds the payload info to the cumulated call tree at the current call stack. |
void |
calculateTime()
Calculates the elapsed time since the creation of the payload and save it in the payload info. |
void |
discardTime()
Discards the associated timing information in the payload, so that the displayed time in the JProfiler GUI will be zero. |
java.lang.String |
getDescription()
Returns the description for the payload info. |
java.lang.Object |
getMemento()
Retrieves the memento object. |
void |
setDescription(java.lang.String description)
Sets the description for the payload info. |
void |
setMemento(java.lang.Object memento)
Sets the memento object. |
Method Detail |
---|
java.lang.String getDescription()
addToCallTree(boolean, boolean)
method works on this description.
void setDescription(java.lang.String description)
description
- the descriptionjava.lang.Object getMemento()
void setMemento(java.lang.Object memento)
memento
- the memento object, can be nullvoid addToCallTree(boolean checkDuplicate, boolean useCap)
If the checkDuplicate argument is true and a duplicate payload with an equal description is detected,
and calculateTime()
has been called, the calculated time is added to the existing payload info.
If the useCap argument is set to true and the current call stack already contains the maximum allowed number payload infos from the same interceptor, the eldest payload info is merged into an "[Earlier calls]" payload info.
checkDuplicate
- whether to check if a payload info with an equal description already exists at the current call stack.useCap
- whether to check the payload cap. The payload cap is defined in the JProfiler GUI and is set to 20 by default.void calculateTime()
void discardTime()
|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |