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 Summary
ConstructorsConstructorDescriptionCreates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext) Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the specifiedSecurityContext. -
Method Summary
Modifier 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.DelegatingSecurityContextExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitMethods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutor
execute, getDelegateExecutor, setSecurityContextHolderStrategyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Constructor Details
-
DelegatingSecurityContextScheduledExecutorService
public DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext) Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the specifiedSecurityContext.- Parameters:
delegateScheduledExecutorService- theScheduledExecutorServiceto delegate to. Cannot be null.securityContext- theSecurityContextto use for eachDelegatingSecurityContextRunnableand eachDelegatingSecurityContextCallable.
-
DelegatingSecurityContextScheduledExecutorService
Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.- Parameters:
delegate- theScheduledExecutorServiceto delegate to. Cannot be null.
-
-
Method Details
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService
-
wrap
-
wrap
-