Class DelegatingSecurityContextAsyncTaskExecutor
java.lang.Object
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
org.springframework.security.task.DelegatingSecurityContextTaskExecutor
org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor
- All Implemented Interfaces:
Executor
,org.springframework.core.task.AsyncTaskExecutor
,org.springframework.core.task.TaskExecutor
- Direct Known Subclasses:
DelegatingSecurityContextSchedulingTaskExecutor
public class DelegatingSecurityContextAsyncTaskExecutor
extends DelegatingSecurityContextTaskExecutor
implements org.springframework.core.task.AsyncTaskExecutor
An
AsyncTaskExecutor
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
ConstructorDescriptionDelegatingSecurityContextAsyncTaskExecutor
(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor) Creates a newDelegatingSecurityContextAsyncTaskExecutor
that uses the currentSecurityContext
.DelegatingSecurityContextAsyncTaskExecutor
(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextAsyncTaskExecutor
that uses the specifiedSecurityContext
. -
Method Summary
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.TaskExecutor
execute
-
Constructor Details
-
DelegatingSecurityContextAsyncTaskExecutor
public DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextAsyncTaskExecutor
that uses the specifiedSecurityContext
.- Parameters:
delegateAsyncTaskExecutor
- theAsyncTaskExecutor
to delegate to. Cannot be null.securityContext
- theSecurityContext
to use for eachDelegatingSecurityContextRunnable
andDelegatingSecurityContextCallable
-
DelegatingSecurityContextAsyncTaskExecutor
public DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor) Creates a newDelegatingSecurityContextAsyncTaskExecutor
that uses the currentSecurityContext
.- Parameters:
delegateAsyncTaskExecutor
- theAsyncTaskExecutor
to delegate to. Cannot be null.
-
-
Method Details
-
execute
- Specified by:
execute
in interfaceorg.springframework.core.task.AsyncTaskExecutor
-
submit
- Specified by:
submit
in interfaceorg.springframework.core.task.AsyncTaskExecutor
-
submit
- Specified by:
submit
in interfaceorg.springframework.core.task.AsyncTaskExecutor
-
wrap
-
wrap
-