Interface AsyncConfigurer
- All Known Implementing Classes:
AsyncConfigurerSupport
public interface AsyncConfigurer
Interface to be implemented for customizing the
Executor instance used when
processing async method invocations or the AsyncUncaughtExceptionHandler
instance used to process exceptions thrown from async methods with a void
return type.
Typically implemented by @Configuration classes annotated with @EnableAsync.
See the @EnableAsync javadoc for usage examples.
NOTE: An AsyncConfigurer will get initialized early.
Do not inject common dependencies into autowired fields directly; instead, consider
declaring a lazy ObjectProvider for those.
- Since:
- 3.1
- Author:
- Chris Beams, Stephane Nicoll
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExecutorTheExecutorinstance to be used when processing async method invocations.default AsyncUncaughtExceptionHandlerTheAsyncUncaughtExceptionHandlerinstance to be used when an exception is thrown during an asynchronous method execution withvoidreturn type.
-
Method Details
-
getAsyncExecutor
TheExecutorinstance to be used when processing async method invocations. -
getAsyncUncaughtExceptionHandler
TheAsyncUncaughtExceptionHandlerinstance to be used when an exception is thrown during an asynchronous method execution withvoidreturn type.
-