public class DelegatingSecurityContextAsyncTaskExecutor extends DelegatingSecurityContextTaskExecutor implements org.springframework.core.task.AsyncTaskExecutor
AsyncTaskExecutor which wraps each Runnable in a
 DelegatingSecurityContextRunnable and each Callable in a
 DelegatingSecurityContextCallable.| Constructor and Description | 
|---|
DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor)
Creates a new  
DelegatingSecurityContextAsyncTaskExecutor that uses the
 current SecurityContext. | 
DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor,
                                          SecurityContext securityContext)
Creates a new  
DelegatingSecurityContextAsyncTaskExecutor that uses the
 specified SecurityContext. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
execute(java.lang.Runnable task,
       long startTimeout)  | 
<T> java.util.concurrent.Future<T> | 
submit(java.util.concurrent.Callable<T> task)  | 
java.util.concurrent.Future<?> | 
submit(java.lang.Runnable task)  | 
protected <T> java.util.concurrent.Callable<T> | 
wrap(java.util.concurrent.Callable<T> delegate)  | 
protected java.lang.Runnable | 
wrap(java.lang.Runnable delegate)  | 
execute, getDelegateExecutorpublic DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor,
                                                  SecurityContext securityContext)
DelegatingSecurityContextAsyncTaskExecutor that uses the
 specified SecurityContext.delegateAsyncTaskExecutor - the AsyncTaskExecutor to delegate to.
 Cannot be null.securityContext - the SecurityContext to use for each
 DelegatingSecurityContextRunnable and
 DelegatingSecurityContextCallablepublic DelegatingSecurityContextAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor delegateAsyncTaskExecutor)
DelegatingSecurityContextAsyncTaskExecutor that uses the
 current SecurityContext.delegateAsyncTaskExecutor - the AsyncTaskExecutor to delegate to.
 Cannot be null.public final void execute(java.lang.Runnable task,
                          long startTimeout)
execute in interface org.springframework.core.task.AsyncTaskExecutorpublic final java.util.concurrent.Future<?> submit(java.lang.Runnable task)
submit in interface org.springframework.core.task.AsyncTaskExecutorpublic final <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
submit in interface org.springframework.core.task.AsyncTaskExecutorprotected final java.lang.Runnable wrap(java.lang.Runnable delegate)
protected final <T> java.util.concurrent.Callable<T> wrap(java.util.concurrent.Callable<T> delegate)