Class DelegatingSecurityContextExecutor
java.lang.Object
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
- All Implemented Interfaces:
Executor
- Direct Known Subclasses:
DelegatingSecurityContextExecutorService
,DelegatingSecurityContextTaskExecutor
- Since:
- 3.2
-
Constructor Summary
ConstructorDescriptionDelegatingSecurityContextExecutor
(Executor delegate) Creates a newDelegatingSecurityContextExecutor
that uses the currentSecurityContext
from theSecurityContextHolder
at the time the task is submitted.DelegatingSecurityContextExecutor
(Executor delegateExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextExecutor
that uses the specifiedSecurityContext
. -
Method Summary
-
Constructor Details
-
DelegatingSecurityContextExecutor
public DelegatingSecurityContextExecutor(Executor delegateExecutor, SecurityContext securityContext) Creates a newDelegatingSecurityContextExecutor
that uses the specifiedSecurityContext
.- Parameters:
delegateExecutor
- theExecutor
to delegate to. Cannot be null.securityContext
- theSecurityContext
to use for eachDelegatingSecurityContextRunnable
or null to default to the currentSecurityContext
-
DelegatingSecurityContextExecutor
Creates a newDelegatingSecurityContextExecutor
that uses the currentSecurityContext
from theSecurityContextHolder
at the time the task is submitted.- Parameters:
delegate
- theExecutor
to delegate to. Cannot be null.
-
-
Method Details