public class DelegatingSecurityContextTaskExecutor extends DelegatingSecurityContextExecutor implements org.springframework.core.task.TaskExecutor
Constructor and Description |
---|
DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegate)
Creates a new
DelegatingSecurityContextTaskExecutor that uses the current
SecurityContext from the SecurityContextHolder . |
DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegateTaskExecutor,
SecurityContext securityContext)
Creates a new
DelegatingSecurityContextTaskExecutor that uses the specified
SecurityContext . |
Modifier and Type | Method and Description |
---|---|
protected <T> java.util.concurrent.Callable<T> |
wrap(java.util.concurrent.Callable<T> delegate) |
protected java.lang.Runnable |
wrap(java.lang.Runnable delegate) |
execute, getDelegateExecutor
public DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegateTaskExecutor, SecurityContext securityContext)
DelegatingSecurityContextTaskExecutor
that uses the specified
SecurityContext
.delegateTaskExecutor
- the TaskExecutor
to delegate to. Cannot be
null.securityContext
- the SecurityContext
to use for each
DelegatingSecurityContextRunnable
public DelegatingSecurityContextTaskExecutor(org.springframework.core.task.TaskExecutor delegate)
DelegatingSecurityContextTaskExecutor
that uses the current
SecurityContext
from the SecurityContextHolder
.delegate
- the TaskExecutor
to delegate to. Cannot be
null.