Interface TaskDecorator
public interface TaskDecorator
Wraps every task an executor runs, as Spring's does: the place to carry something from the submitting thread -- a tenant, a trace, a security principal -- to the one that runs the task, and to clear it afterwards.
Tasks.executor("mail").setTaskDecorator(TenantContext.decorator());
TenantContext.decorator() carries the tenant;
write one of these by hand for anything else held per thread.
-
Method Summary
-
Method Details
-
decorate
-