Class ThreadCtx


  • public class ThreadCtx
    extends java.lang.Object
    Because OpenHTMLtoPDF is designed to run in a single thread at all times for one invocation, we can use a ThreadLocal to store pseudo global variables. This MUST be set up in the appropriate renderer.
    • Field Detail

      • diagnosticConsumer

        private static final java.lang.ThreadLocal<java.util.function.Consumer<Diagnostic>> diagnosticConsumer
    • Constructor Detail

      • ThreadCtx

        public ThreadCtx()
    • Method Detail

      • addDiagnostic

        static void addDiagnostic​(Diagnostic diagnostic)
      • cleanup

        public static void cleanup()
      • applyDiagnosticConsumer

        public static java.io.Closeable applyDiagnosticConsumer​(java.util.function.Consumer<Diagnostic> consumer)