Annotation Type SplitInterception
-
@Retention(RUNTIME) @Target(METHOD) public @interface SplitInterceptionDeclares an interception that creates a split in the call tree and optionally an associated payload. The annotated probe method must be public and static and returnStringorPayload.You can get information from the intercepted method like parameter values or the instance by declaring parameters annotated with the annotations from the com.jprofiler.api.probe.injected.parameter package. You can also declare a parameter of type
ProbeContextto open or close control objects or check if the probe is currently being recorded.If you return a
Payloadto specify control objects or custom event types, you must declare a parameter of typeProbeContextand create the returned object withProbeContext.createPayload(String, Object, Enum).If you don't want to create a split for the current invocation, the probe method can return
null.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description MethodSpecmethodSpecifies the method that should be intercepted.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanexceptionPayloadsIf payloads should also be recorded if the method throws an exception.booleanpayloadsIf payloads should be created in addition to the call tree split.booleanreentrantIndicates if your interception is reentrant.
-
-
-
Element Detail
-
method
MethodSpec method
Specifies the method that should be intercepted.- Returns:
- a method specification
-
-
-
reentrant
boolean reentrant
Indicates if your interception is reentrant. Iffalse, the probe method will not be called for recursive invocations of the intercepted method and only one split will be created.If
true, splits will be nested, but only one payload will be created for the outermost call.- Returns:
- if your probe method should be called for recursive invocations
- Default:
- false
-
-