Class DelegatingSecurityContextTaskExecutor
- java.lang.Object
-
- org.springframework.security.concurrent.DelegatingSecurityContextExecutor
-
- org.springframework.security.task.DelegatingSecurityContextTaskExecutor
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,org.springframework.core.task.TaskExecutor
- Direct Known Subclasses:
DelegatingSecurityContextAsyncTaskExecutor
public class DelegatingSecurityContextTaskExecutor extends DelegatingSecurityContextExecutor implements org.springframework.core.task.TaskExecutor
- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegate)
Creates a newDelegatingSecurityContextTaskExecutor
that uses the currentSecurityContext
from theSecurityContextHolder
.DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegateTaskExecutor, SecurityContext securityContext)
Creates a newDelegatingSecurityContextTaskExecutor
that uses the specifiedSecurityContext
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Runnable
wrap(java.lang.Runnable delegate)
protected <T> java.util.concurrent.Callable<T>
wrap(java.util.concurrent.Callable<T> delegate)
-
Methods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutor
execute, getDelegateExecutor
-
-
-
-
Constructor Detail
-
DelegatingSecurityContextTaskExecutor
public DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegateTaskExecutor, SecurityContext securityContext)
Creates a newDelegatingSecurityContextTaskExecutor
that uses the specifiedSecurityContext
.- Parameters:
delegateTaskExecutor
- theTaskExecutor
to delegate to. Cannot be null.securityContext
- theSecurityContext
to use for eachDelegatingSecurityContextRunnable
-
DelegatingSecurityContextTaskExecutor
public DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegate)
Creates a newDelegatingSecurityContextTaskExecutor
that uses the currentSecurityContext
from theSecurityContextHolder
.- Parameters:
delegate
- theTaskExecutor
to delegate to. Cannot be null.
-
-