public class DelegatingSecurityContextSchedulingTaskExecutor extends DelegatingSecurityContextAsyncTaskExecutor implements org.springframework.scheduling.SchedulingTaskExecutor
SchedulingTaskExecutor which wraps each Runnable in a
DelegatingSecurityContextRunnable and each Callable in a
DelegatingSecurityContextCallable.| Constructor and Description |
|---|
DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.SchedulingTaskExecutor delegateAsyncTaskExecutor)
Creates a new
DelegatingSecurityContextSchedulingTaskExecutor that uses the
current SecurityContext. |
DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.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, getDelegateExecutorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.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(org.springframework.scheduling.SchedulingTaskExecutor delegateAsyncTaskExecutor)
DelegatingSecurityContextSchedulingTaskExecutor that uses the
current SecurityContext.delegateAsyncTaskExecutor - the AsyncTaskExecutor to delegate to.
Cannot be null.public boolean prefersShortLivedTasks()
prefersShortLivedTasks in interface org.springframework.scheduling.SchedulingTaskExecutorprotected final java.lang.Runnable wrap(java.lang.Runnable delegate)
protected final <T> java.util.concurrent.Callable<T> wrap(java.util.concurrent.Callable<T> delegate)