public abstract class PayloadProbe
extends java.lang.Object
Payload
.
You can override the methods of this class to configure your probe. The only method you have to implement is
getName()
.
You can add additional custom telemetries by adding public static methods to your subclass that return a number type and are annotated with Telemetry
.
Constructor and Description |
---|
PayloadProbe() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getControlObjectName(java.lang.Object controlObject)
If you use control objects and a previously unknown control object is passed to
Payload.enter(Class, Object, Enum) , Payload.execute(Class, String, Object, Enum, Runnable) or
Payload.execute(Class, String, Object, Enum, Callable) , the JProfiler agent will call this method to associate a name with the control object. |
java.lang.Class<? extends java.lang.Enum> |
getCustomTypes()
You can specify custom types for events.
|
java.lang.String |
getDescription()
You can override this method to add a description to your probe in the JProfiler UI.
|
abstract java.lang.String |
getName()
Implement this method to specify the display name of your probe
In the JProfiler UI, this string is used for the view name in the view selector below the "JEE & probes" section.
|
boolean |
isControlObjects()
If your probe supports control objects, you have to override this method and return
true . |
boolean |
isDefaultTelemetries()
You can override this method and return
false if you want to remove the default telemetries. |
boolean |
isEvents()
You can override this method and return
false if you want to remove the events view. |
public abstract java.lang.String getName()
public java.lang.String getDescription()
public boolean isEvents()
false
if you want to remove the events view.public boolean isDefaultTelemetries()
false
if you want to remove the default telemetries.
The default telemetries are the event frequency and the average duration telemetries as well as the open control
object telemetries if isControlObjects()
returns true
.public boolean isControlObjects()
true
.public java.lang.Class<? extends java.lang.Enum> getCustomTypes()
Enum
class with all your states as constants. The toString()
method is used for
the event display name. You can further customize your events by implementing TypeCustomizer
in the enum class.public java.lang.String getControlObjectName(java.lang.Object controlObject)
Payload.enter(Class, Object, Enum)
, Payload.execute(Class, String, Object, Enum, Runnable)
or
Payload.execute(Class, String, Object, Enum, Callable)
, the JProfiler agent will call this method to associate a name with the control object. You can alternatively associate a name
with a control object by calling Payload.openControlObject(Class, Object, String)
.controlObject
- the control object that has no name associated yet