Interface Processor.ExecutionContext

  • All Known Implementing Classes:
    AbstractProcessor.Context
    Enclosing interface:
    Processor<IN,​OUT>

    public static interface Processor.ExecutionContext
    An execution context for a specific print task.
    • Method Detail

      • stopIfCanceled

        void stopIfCanceled()
        Throws a CancellationException if the job was canceled.
      • getStats

        ExecutionStats getStats()
        Returns:
        The ExecutionStats object
      • getMDCContext

        java.util.Map<java.lang.String,​java.lang.String> getMDCContext()
        Returns:
        The MDC context for the current print job.
      • mdcContext

        <T> T mdcContext​(java.util.function.Supplier<T> action)
        Set the MDC context while running the action.
        Type Parameters:
        T - The returned class
        Parameters:
        action - The action to run
      • mdcContextEx

        <T> T mdcContextEx​(java.util.concurrent.Callable<T> action)
                    throws java.lang.Exception
        Set the MDC context while running the action.
        Type Parameters:
        T - The returned class
        Parameters:
        action - The action to run
        Throws:
        java.lang.Exception