org.springframework.security.concurrent
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
Method Summary |
|
schedule(Callable<V> callable,
long delay,
TimeUnit unit)
|
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
|
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
|
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
|
protected
|
wrap(Callable<T> delegate)
|
protected Runnable |
wrap(Runnable 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.concurrent.ExecutorService |
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit |
DelegatingSecurityContextScheduledExecutorService
public DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService,
SecurityContext securityContext)
- Creates a new
DelegatingSecurityContextScheduledExecutorService
that uses the specified
SecurityContext
.
- Parameters:
delegateScheduledExecutorService
- the ScheduledExecutorService
to delegate to. Cannot be null.securityContext
- the SecurityContext
to use for each DelegatingSecurityContextRunnable
and
each DelegatingSecurityContextCallable
.
DelegatingSecurityContextScheduledExecutorService
public DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegate)
- Creates a new
DelegatingSecurityContextScheduledExecutorService
that uses the current
SecurityContext
from the SecurityContextHolder
.
- Parameters:
delegateTaskExecutor
- the TaskExecutor
to delegate to. Cannot be null.
schedule
public final ScheduledFuture<?> schedule(Runnable command,
long delay,
TimeUnit unit)
- Specified by:
schedule
in interface ScheduledExecutorService
schedule
public final <V> ScheduledFuture<V> schedule(Callable<V> callable,
long delay,
TimeUnit unit)
- Specified by:
schedule
in interface ScheduledExecutorService
scheduleAtFixedRate
public final ScheduledFuture<?> scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interface ScheduledExecutorService
scheduleWithFixedDelay
public final ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interface ScheduledExecutorService
wrap
protected final Runnable wrap(Runnable delegate)
wrap
protected final <T> Callable<T> wrap(Callable<T> delegate)