public class DelegatingSecurityContextSchedulingTaskExecutor extends DelegatingSecurityContextAsyncTaskExecutor
SchedulingTaskExecutor which wraps each Runnable in a
DelegatingSecurityContextRunnable and each Callable in a
DelegatingSecurityContextCallable.| Constructor and Description |
|---|
DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateAsyncTaskExecutor)
Creates a new
DelegatingSecurityContextSchedulingTaskExecutor that uses the
current SecurityContext. |
DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateSchedulingTaskExecutor,
SecurityContext securityContext)
Creates a new
DelegatingSecurityContextSchedulingTaskExecutor that uses the
specified SecurityContext. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
prefersShortLivedTasks() |
protected <T> java.util.concurrent.Callable<T> |
wrap(java.util.concurrent.Callable<T> delegate) |
protected java.lang.Runnable |
wrap(java.lang.Runnable delegate) |
execute, submit, submitexecute, getDelegateExecutorpublic DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateSchedulingTaskExecutor,
SecurityContext securityContext)
DelegatingSecurityContextSchedulingTaskExecutor that uses the
specified SecurityContext.delegateSchedulingTaskExecutor - the SchedulingTaskExecutor to
delegate to. Cannot be null.securityContext - the SecurityContext to use for each
DelegatingSecurityContextRunnable and
DelegatingSecurityContextCallablepublic DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateAsyncTaskExecutor)
DelegatingSecurityContextSchedulingTaskExecutor that uses the
current SecurityContext.delegateAsyncTaskExecutor - the AsyncTaskExecutor to delegate to.
Cannot be null.