org.springframework.security.concurrent
Class DelegatingSecurityContextExecutorService
java.lang.Object
   org.springframework.security.concurrent.DelegatingSecurityContextExecutor
org.springframework.security.concurrent.DelegatingSecurityContextExecutor
       org.springframework.security.concurrent.DelegatingSecurityContextExecutorService
org.springframework.security.concurrent.DelegatingSecurityContextExecutorService
- All Implemented Interfaces: 
- Executor, ExecutorService
- Direct Known Subclasses: 
- DelegatingSecurityContextScheduledExecutorService
- public class DelegatingSecurityContextExecutorService 
- extends DelegatingSecurityContextExecutor- implements ExecutorService
An ExecutorService which wraps each Runnable in a DelegatingSecurityContextRunnable and each
 Callable in a DelegatingSecurityContextCallable.
- Since:
- 3.2
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
DelegatingSecurityContextExecutorService
public DelegatingSecurityContextExecutorService(ExecutorService delegateExecutorService,
                                                SecurityContext securityContext)
- Creates a new DelegatingSecurityContextExecutorServicethat uses the specifiedSecurityContext.
 
- Parameters:
- delegateExecutorService- the- ExecutorServiceto delegate to. Cannot be null.
- securityContext- the- SecurityContextto use for each- DelegatingSecurityContextRunnableand
 each- DelegatingSecurityContextCallable.
 
DelegatingSecurityContextExecutorService
public DelegatingSecurityContextExecutorService(ExecutorService delegate)
- Creates a new DelegatingSecurityContextExecutorServicethat uses the currentSecurityContextfrom
 theSecurityContextHolder.
 
- Parameters:
- delegateTaskExecutor- the- TaskExecutorto delegate to. Cannot be null.
 
shutdown
public final void shutdown()
- 
- Specified by:
- shutdownin interface- ExecutorService
 
- 
 
shutdownNow
public final List<Runnable> shutdownNow()
- 
- Specified by:
- shutdownNowin interface- ExecutorService
 
- 
 
isShutdown
public final boolean isShutdown()
- 
- Specified by:
- isShutdownin interface- ExecutorService
 
- 
 
isTerminated
public final boolean isTerminated()
- 
- Specified by:
- isTerminatedin interface- ExecutorService
 
- 
 
awaitTermination
public final boolean awaitTermination(long timeout,
                                      TimeUnit unit)
                               throws InterruptedException
- 
- Specified by:
- awaitTerminationin interface- ExecutorService
 
- 
- Throws:
- InterruptedException
 
submit
public final <T> Future<T> submit(Callable<T> task)
- 
- Specified by:
- submitin interface- ExecutorService
 
- 
 
submit
public final <T> Future<T> submit(Runnable task,
                                  T result)
- 
- Specified by:
- submitin interface- ExecutorService
 
- 
 
submit
public final Future<?> submit(Runnable task)
- 
- Specified by:
- submitin interface- ExecutorService
 
- 
 
invokeAll
public final List invokeAll(Collection tasks)
                     throws InterruptedException
- 
- Specified by:
- invokeAllin interface- ExecutorService
 
- 
- Throws:
- InterruptedException
 
invokeAll
public final List invokeAll(Collection tasks,
                            long timeout,
                            TimeUnit unit)
                     throws InterruptedException
- 
- Specified by:
- invokeAllin interface- ExecutorService
 
- 
- Throws:
- InterruptedException
 
invokeAny
public final Object invokeAny(Collection tasks)
                       throws InterruptedException,
                              ExecutionException
- 
- Specified by:
- invokeAnyin interface- ExecutorService
 
- 
- Throws:
- InterruptedException
- ExecutionException
 
invokeAny
public final Object invokeAny(Collection tasks,
                              long timeout,
                              TimeUnit unit)
                       throws InterruptedException,
                              ExecutionException,
                              TimeoutException
- 
- Specified by:
- invokeAnyin interface- ExecutorService
 
- 
- Throws:
- InterruptedException
- ExecutionException
- TimeoutException
 
wrap
protected final Runnable wrap(Runnable delegate)
- 
 
wrap
protected final <T> Callable<T> wrap(Callable<T> delegate)
-