public class DelegatingSecurityContextExecutor extends Object implements Executor
Constructor and Description |
---|
DelegatingSecurityContextExecutor(Executor delegate)
Creates a new
DelegatingSecurityContextExecutor that uses the current
SecurityContext from the SecurityContextHolder at the time the task
is submitted. |
DelegatingSecurityContextExecutor(Executor delegateExecutor,
SecurityContext securityContext)
Creates a new
DelegatingSecurityContextExecutor that uses the specified
SecurityContext . |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable task) |
protected Executor |
getDelegateExecutor() |
protected <T> Callable<T> |
wrap(Callable<T> delegate) |
protected Runnable |
wrap(Runnable delegate) |
public DelegatingSecurityContextExecutor(Executor delegateExecutor, SecurityContext securityContext)
DelegatingSecurityContextExecutor
that uses the specified
SecurityContext
.delegateExecutor
- the Executor
to delegate to. Cannot be null.securityContext
- the SecurityContext
to use for each
DelegatingSecurityContextRunnable
or null to default to the current
SecurityContext
public DelegatingSecurityContextExecutor(Executor delegate)
DelegatingSecurityContextExecutor
that uses the current
SecurityContext
from the SecurityContextHolder
at the time the task
is submitted.delegate
- the Executor
to delegate to. Cannot be null.