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