@FunctionalInterface public interface TaskDecorator
Runnableabout to be executed.
Note that such a decorator is not necessarily being applied to the
Callable but rather to the actual
execution callback (which may be a wrapper around the user-supplied task).
The primary use case is to set some execution context around the task's invocation, or to provide some monitoring/statistics for task execution.
NOTE: Exception handling in
may be limited. Specifically in case of a
Runnable will be a wrapper which does not propagate
any exceptions from its
|Modifier and Type||Method and Description|
Decorate the given
Runnable decorate(Runnable runnable)
Runnable, returning a potentially wrapped
Runnablefor actual execution, internally delegating to the original
runnable- the original