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(Runnable task,
long startTimeout) |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
protected <T> Callable<T> |
wrap(Callable<T> delegate) |
protected Runnable |
wrap(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(Runnable task, long startTimeout)
execute in interface org.springframework.core.task.AsyncTaskExecutorpublic final Future<?> submit(Runnable task)
submit in interface org.springframework.core.task.AsyncTaskExecutorpublic final <T> Future<T> submit(Callable<T> task)
submit in interface org.springframework.core.task.AsyncTaskExecutorCopyright © 2016. All rights reserved.