org.springframework.security.scheduling
Class DelegatingSecurityContextSchedulingTaskExecutor
java.lang.Object
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
org.springframework.security.task.DelegatingSecurityContextTaskExecutor
org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor
org.springframework.security.scheduling.DelegatingSecurityContextSchedulingTaskExecutor
- All Implemented Interfaces:
- Executor, AsyncTaskExecutor, TaskExecutor, SchedulingTaskExecutor
public class DelegatingSecurityContextSchedulingTaskExecutor
- extends DelegatingSecurityContextAsyncTaskExecutor
- implements SchedulingTaskExecutor
An SchedulingTaskExecutor
which wraps each Runnable
in a DelegatingSecurityContextRunnable
and each
Callable
in a DelegatingSecurityContextCallable
.
- Since:
- 3.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingSecurityContextSchedulingTaskExecutor
public DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateSchedulingTaskExecutor,
SecurityContext securityContext)
- Creates a new
DelegatingSecurityContextSchedulingTaskExecutor
that uses the specified SecurityContext
.
- Parameters:
delegateSchedulingTaskExecutor
- the SchedulingTaskExecutor
to delegate to. Cannot be null.securityContext
- the SecurityContext
to use for each DelegatingSecurityContextRunnable
and
DelegatingSecurityContextCallable
DelegatingSecurityContextSchedulingTaskExecutor
public DelegatingSecurityContextSchedulingTaskExecutor(SchedulingTaskExecutor delegateAsyncTaskExecutor)
- Creates a new
DelegatingSecurityContextSchedulingTaskExecutor
that uses the current SecurityContext
.
- Parameters:
delegateAsyncTaskExecutor
- the AsyncTaskExecutor
to delegate to. Cannot be null.
prefersShortLivedTasks
public boolean prefersShortLivedTasks()
- Specified by:
prefersShortLivedTasks
in interface SchedulingTaskExecutor
wrap
protected final Runnable wrap(Runnable delegate)
wrap
protected final <T> Callable<T> wrap(Callable<T> delegate)