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, submit
execute, getDelegateExecutor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
public 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
.delegate
- the ScheduledExecutorService
to delegate to. Cannot be
null.public final ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule
in interface ScheduledExecutorService
public final <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule
in interface ScheduledExecutorService
public final ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate
in interface ScheduledExecutorService
public final ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay
in interface ScheduledExecutorService