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
,org.springframework.core.task.AsyncTaskExecutor
,org.springframework.core.task.TaskExecutor
,org.springframework.scheduling.SchedulingTaskExecutor
public class DelegatingSecurityContextSchedulingTaskExecutor
extends DelegatingSecurityContextAsyncTaskExecutor
implements org.springframework.scheduling.SchedulingTaskExecutor
An
SchedulingTaskExecutor
which wraps each Runnable
in a
DelegatingSecurityContextRunnable
and each Callable
in a
DelegatingSecurityContextCallable
.- Since:
- 3.2
-
Field Summary
Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE
-
Constructor Summary
ConstructorDescriptionDelegatingSecurityContextSchedulingTaskExecutor
(org.springframework.scheduling.SchedulingTaskExecutor delegateAsyncTaskExecutor) Creates a newDelegatingSecurityContextSchedulingTaskExecutor
that uses the currentSecurityContext
.DelegatingSecurityContextSchedulingTaskExecutor
(org.springframework.scheduling.SchedulingTaskExecutor delegateSchedulingTaskExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextSchedulingTaskExecutor
that uses the specifiedSecurityContext
. -
Method Summary
Methods inherited from class org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor
execute, submit, submit
Methods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutor
execute, getDelegateExecutor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.task.AsyncTaskExecutor
execute, submit, submit
Methods inherited from interface org.springframework.core.task.TaskExecutor
execute
-
Constructor Details
-
DelegatingSecurityContextSchedulingTaskExecutor
public DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.SchedulingTaskExecutor delegateSchedulingTaskExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextSchedulingTaskExecutor
that uses the specifiedSecurityContext
.- Parameters:
delegateSchedulingTaskExecutor
- theSchedulingTaskExecutor
to delegate to. Cannot be null.securityContext
- theSecurityContext
to use for eachDelegatingSecurityContextRunnable
andDelegatingSecurityContextCallable
-
DelegatingSecurityContextSchedulingTaskExecutor
public DelegatingSecurityContextSchedulingTaskExecutor(org.springframework.scheduling.SchedulingTaskExecutor delegateAsyncTaskExecutor) Creates a newDelegatingSecurityContextSchedulingTaskExecutor
that uses the currentSecurityContext
.- Parameters:
delegateAsyncTaskExecutor
- theAsyncTaskExecutor
to delegate to. Cannot be null.
-
-
Method Details
-
prefersShortLivedTasks
public boolean prefersShortLivedTasks()- Specified by:
prefersShortLivedTasks
in interfaceorg.springframework.scheduling.SchedulingTaskExecutor
-
wrap
-
wrap
-