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