Annotation Type PayloadInterception

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      InvocationType invokeOn
      The point at which the annotated probe method is invoked.
      MethodSpec method
      Specifies the method that should be intercepted.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean exceptionPayloads
      If payloads should also be recorded if the method throws an exception.
      boolean reentrant
      Indicates if your interception is reentrant.
    • Element Detail

      • invokeOn

        InvocationType invokeOn
        The point at which the annotated probe method is invoked.
        Returns:
        the invocation type
      • method

        MethodSpec method
        Specifies the method that should be intercepted.
        Returns:
        a method specification
      • reentrant

        boolean reentrant
        Indicates if your interception is reentrant. If false, the probe method will not be called for recursive invocations of the intercepted method.

        If true, the payload name (and the other information in Payload) returned by the subsequent inner calls will be used, but timing and call tree location will be used from the outermost call. You can use ProbeContext.restartTiming() and ProbeContext.restartTimingAndLocation() to customize this behavior. If you want to retain the name from outer calls you can use ProbeContext.getOuterPayload().

        Returns:
        if your probe method should be called for recursive invocations
        Default:
        false
      • exceptionPayloads

        boolean exceptionPayloads
        If payloads should also be recorded if the method throws an exception. If invokeOn() is set to InvocationType.EXCEPTION or InvocationType.EXIT, JProfiler will always record payloads for exceptional exits.
        Returns:
        if payloads should be recorded for exceptional exits
        Default:
        false