Class DelegatingSecurityContextScheduledExecutorService
java.lang.Object
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
org.springframework.security.concurrent.DelegatingSecurityContextExecutorService
org.springframework.security.concurrent.DelegatingSecurityContextScheduledExecutorService
- All Implemented Interfaces:
- Executor,- ExecutorService,- ScheduledExecutorService
public final class DelegatingSecurityContextScheduledExecutorService
extends DelegatingSecurityContextExecutorService
implements ScheduledExecutorService
An 
ScheduledExecutorService which wraps each Runnable in a
 DelegatingSecurityContextRunnable and each Callable in a
 DelegatingSecurityContextCallable.- Since:
- 3.2
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext) Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the specifiedSecurityContext.
- 
Method SummaryModifier and TypeMethodDescription<V> ScheduledFuture<V>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) protected final Runnableprotected final <T> Callable<T>Methods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutorServiceawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitMethods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutorexecute, getDelegateExecutor, setSecurityContextHolderStrategyMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.ExecutorServiceawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
- 
Constructor Details- 
DelegatingSecurityContextScheduledExecutorServicepublic DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext) Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the specifiedSecurityContext.- Parameters:
- delegateScheduledExecutorService- the- ScheduledExecutorServiceto delegate to. Cannot be null.
- securityContext- the- SecurityContextto use for each- DelegatingSecurityContextRunnableand each- DelegatingSecurityContextCallable.
 
- 
DelegatingSecurityContextScheduledExecutorServiceCreates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.- Parameters:
- delegate- the- ScheduledExecutorServiceto delegate to. Cannot be null.
 
 
- 
- 
Method Details- 
schedule- Specified by:
- schedulein interface- ScheduledExecutorService
 
- 
schedule- Specified by:
- schedulein interface- ScheduledExecutorService
 
- 
scheduleAtFixedRatepublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
- scheduleAtFixedRatein interface- ScheduledExecutorService
 
- 
scheduleWithFixedDelaypublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
- scheduleWithFixedDelayin interface- ScheduledExecutorService
 
- 
wrap
- 
wrap
 
-