Overview | Package | Class | Tree | Deprecated | Index | Help
| JProfiler API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jprofiler.api.agent.probe
Interface PayloadInfo

    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 context class and can have optional memento objects that help you keep additional 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 probe.

See Also:
  `InterceptorContext.createPayloadInfo(String)`, `InterceptorContext.createPayloadInfo(String, Object)`

Method Summary
`PayloadInfo` | `calculateTime()` Calculates the elapsed time since the creation of the payload and save it in the payload info.
`PayloadInfo` | `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

### getDescription

    java.lang.String getDescription()

  Returns the description for the payload info.

  Returns:
    the description

### setDescription

    void setDescription(java.lang.String description)

  Sets the description for the payload info.

  Parameters:
    `description` - the description

### getMemento

    java.lang.Object getMemento()

  Retrieves the memento object.

  Returns:
    the memento object, can be `null`

### setMemento

    void setMemento(java.lang.Object memento)

  Sets the memento object. When you are finished with the payload info (for example when you add it to the call tree), you might want to set the memento object to `null`, to prevent possible memory leaks.

  Parameters:
    `memento` - the memento object, can be `null`

### calculateTime

    PayloadInfo calculateTime()

  Calculates the elapsed time since the creation of the payload and save it in the payload info. This timing information is displayed in the hot spots view of the probe. If the probe annotates data into the call tree, it is also displayed in the call tree view.

  Returns:
    this object

### discardTime

    PayloadInfo discardTime()

  Discards the associated timing information in the payload, so that the displayed time in the JProfiler GUI will be zero.

  Returns:
    this object

Overview | Package | Class | Tree | Deprecated | Index | Help
| JProfiler API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD