Class DelegatingSecurityContextScheduledExecutorService
- java.lang.Object
-
- org.springframework.security.concurrent.DelegatingSecurityContextExecutor
-
- org.springframework.security.concurrent.DelegatingSecurityContextExecutorService
-
- org.springframework.security.concurrent.DelegatingSecurityContextScheduledExecutorService
-
- All Implemented Interfaces:
java.util.concurrent.Executor,java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService
public final class DelegatingSecurityContextScheduledExecutorService extends DelegatingSecurityContextExecutorService implements java.util.concurrent.ScheduledExecutorService
AnScheduledExecutorServicewhich wraps eachRunnablein aDelegatingSecurityContextRunnableand eachCallablein aDelegatingSecurityContextCallable.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description DelegatingSecurityContextScheduledExecutorService(java.util.concurrent.ScheduledExecutorService delegate)Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.DelegatingSecurityContextScheduledExecutorService(java.util.concurrent.ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext)Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the specifiedSecurityContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ScheduledFuture<?>schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)<V> java.util.concurrent.ScheduledFuture<V>schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)java.util.concurrent.ScheduledFuture<?>scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)java.util.concurrent.ScheduledFuture<?>scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)protected java.lang.Runnablewrap(java.lang.Runnable delegate)protected <T> java.util.concurrent.Callable<T>wrap(java.util.concurrent.Callable<T> delegate)-
Methods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
-
Methods inherited from class org.springframework.security.concurrent.DelegatingSecurityContextExecutor
execute, getDelegateExecutor
-
-
-
-
Constructor Detail
-
DelegatingSecurityContextScheduledExecutorService
public DelegatingSecurityContextScheduledExecutorService(java.util.concurrent.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
public DelegatingSecurityContextScheduledExecutorService(java.util.concurrent.ScheduledExecutorService delegate)
Creates a newDelegatingSecurityContextScheduledExecutorServicethat uses the currentSecurityContextfrom theSecurityContextHolder.- Parameters:
delegate- theScheduledExecutorServiceto delegate to. Cannot be null.
-
-
Method Detail
-
schedule
public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)- Specified by:
schedulein interfacejava.util.concurrent.ScheduledExecutorService
-
schedule
public <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)- Specified by:
schedulein interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleAtFixedRate
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)- Specified by:
scheduleAtFixedRatein interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleWithFixedDelay
public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)- Specified by:
scheduleWithFixedDelayin interfacejava.util.concurrent.ScheduledExecutorService
-
wrap
protected final java.lang.Runnable wrap(java.lang.Runnable delegate)
-
wrap
protected final <T> java.util.concurrent.Callable<T> wrap(java.util.concurrent.Callable<T> delegate)
-
-