Package org.mapfish.print.processor
Interface Processor.ExecutionContext
-
- All Known Implementing Classes:
AbstractProcessor.Context
public static interface Processor.ExecutionContext
An execution context for a specific print task.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getMDCContext()
ExecutionStats
getStats()
<T> T
mdcContext(java.util.function.Supplier<T> action)
Set the MDC context while running the action.<T> T
mdcContextEx(java.util.concurrent.Callable<T> action)
Set the MDC context while running the action.void
stopIfCanceled()
Throws a CancellationException if the job was canceled.
-
-
-
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
-
-