public final class DelegatingSecurityContextScheduledExecutorService extends DelegatingSecurityContextExecutorService implements ScheduledExecutorService
ScheduledExecutorService which wraps each Runnable in a DelegatingSecurityContextRunnable
and each Callable in a DelegatingSecurityContextCallable.| Constructor and Description |
|---|
DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegate)
Creates a new
DelegatingSecurityContextScheduledExecutorService that uses the current
SecurityContext from the SecurityContextHolder. |
DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService,
SecurityContext securityContext)
Creates a new
DelegatingSecurityContextScheduledExecutorService that uses the specified
SecurityContext. |
| Modifier and Type | Method and Description |
|---|---|
<V> ScheduledFuture<V> |
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 <T> Callable<T> |
wrap(Callable<T> delegate) |
protected Runnable |
wrap(Runnable delegate) |
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitexecute, getDelegateExecutorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitpublic DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegateScheduledExecutorService, SecurityContext securityContext)
DelegatingSecurityContextScheduledExecutorService that uses the specified
SecurityContext.delegateScheduledExecutorService - the ScheduledExecutorService to delegate to. Cannot be null.securityContext - the SecurityContext to use for each DelegatingSecurityContextRunnable and
each DelegatingSecurityContextCallable.public DelegatingSecurityContextScheduledExecutorService(ScheduledExecutorService delegate)
DelegatingSecurityContextScheduledExecutorService that uses the current
SecurityContext from the SecurityContextHolder.delegateTaskExecutor - the TaskExecutor to delegate to. Cannot be null.public final ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic final <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic final ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface ScheduledExecutorServicepublic final ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface ScheduledExecutorService