ntiate or acquire Callable from somewhere{@link Subject Subject} subject = {@link org.apache.shiro.SecurityUtils SecurityUtils}. {@link org.apache.shiro.SecurityUtils#getSubject() getSubject()}; {@link Callable Callable} work = subject.{@link Subject#associateWith(Callable) associateWith(applicationWork)}; {@link ExecutorService anExecutorService}. {@link ExecutorService#submit(Callable) submit(work)}; Instead, if the {@code ExecutorService} instance used at runtime is an instance of this class(which delegates to the target ExecutorService that you want), all places in code like the above reduce to this:
{@link Callable Callable} applicationWork = //instantiate or acquire Callable from somewhere{@link ExecutorService anExecutorService}. {@link ExecutorService#submit(Callable) submit(work)};
Notice there is no use of the Shiro API in the 2nd code block, encouraging the principle of loose coupling across your codebase.
@since 1.0