Class ProxyCallback


  • public class ProxyCallback
    extends Object
    This type is here to allow us to access it from anywhere (once it is loaded into the boot class path).

    This will simply act as a proxy to the Callback which is where we do the real work.

    This split is to allow us to support Lucee and other OSGi style environments that use isolated class loaders.

    • Constructor Detail

      • ProxyCallback

        public ProxyCallback()
    • Method Detail

      • callBackCF

        public static void callBackCF​(List<String> bpIds,
                                      String filename,
                                      int lineNo,
                                      Map<String,​Object> map)
        The main entry point for CF ASM injected breakpoints.
        Parameters:
        bpIds - the bp ids to trigger
        filename - the filename of the breakpoint hit
        lineNo - the line number of the breakpoint hit
        map - the map of local variables.
      • callBack

        public static void callBack​(List<String> bpIds,
                                    String filename,
                                    int lineNo,
                                    Map<String,​Object> map)
        The main entry point for non CF ASM injected breakpoints.
        Parameters:
        bpIds - the bp ids to trigger
        filename - the filename of the breakpoint hit
        lineNo - the line number of the breakpoint hit
        map - the map of local variables.
      • callBackException

        public static void callBackException​(Throwable e)
        This is called when an exception is caught on a wrapped line, this is not always called.
        Parameters:
        e - the exception caught
      • callBackFinally

        public static void callBackFinally​(List<String> bpIds,
                                           String filename,
                                           int lineNo,
                                           Map<String,​Object> variables)
        This is called when the visited line is completed.
        Parameters:
        bpIds - the tracepoint ids that triggered this
        filename - the source file name
        lineNo - the line number we are on
        variables - the captured local variables
      • methodEntry

        public static void methodEntry​(String methodName,
                                       String filename,
                                       int lineNo,
                                       List<String> bpIds,
                                       Map<String,​Object> variables,
                                       String spanOnlyIds)
        This method is called when a tracepoint has triggered a method entry type.

        This method will Always return a closable. This way the injected code never deals with anything but calling close. Even if close doesn't do anything.

        We use Closeable here, so we can stick to java types in the injected code. This makes testing and injected code simpler.

        Parameters:
        methodName - the method name we have entered
        filename - the file name the method is in
        lineNo - the line number the method is on
        bpIds - the tracepoint ids that have been triggered by this entry
        variables - the map of variables captured
        spanOnlyIds - the CSV of the tracepoints ids that just want a span
      • methodException

        public static void methodException​(Throwable t)
        This is called when an exception is captured from a wrapped method.
        Parameters:
        t - the captured throwable
      • methodRet

        public static void methodRet​(Object value)
        This is called when the returned value from the wrapped method is captured.

        This method is not called on void methods.

        Parameters:
        value - the captured return value.
      • methodEnd

        public static void methodEnd​(String methodName,
                                     String filename,
                                     int lineNo,
                                     List<String> bpIds,
                                     Map<String,​Object> variables)
        This method is called when a wrapped method has completed.
        Parameters:
        methodName - the method name
        filename - the source file name
        lineNo - the line number
        bpIds - the triggering tracepoints ids
        variables - the captured local variables