Interface AsyncConfigurer
- All Known Implementing Classes:
AsyncConfigurerSupport
public interface AsyncConfigurer
Interface to be implemented by @Configuration
classes annotated with @EnableAsync
that wish to customize theExecutor
instance used when processing async method invocations or theAsyncUncaughtExceptionHandler
instance used to process exception thrown from async method withvoid
return type.Consider using
AsyncConfigurerSupport
providing default implementations for both methods if only one element needs to be customized. Furthermore, backward compatibility of this interface will be insured in case new customization options are introduced in the future.See @
EnableAsync
for usage examples.- Since:
- 3.1
- Author:
- Chris Beams, Stephane Nicoll
- See Also:
AbstractAsyncConfiguration
,EnableAsync
,AsyncConfigurerSupport
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Executor
getAsyncExecutor()
TheExecutor
instance to be used when processing async method invocations.default AsyncUncaughtExceptionHandler
getAsyncUncaughtExceptionHandler()
TheAsyncUncaughtExceptionHandler
instance to be used when an exception is thrown during an asynchronous method execution withvoid
return type.
Method Detail
getAsyncExecutor
@Nullable default Executor getAsyncExecutor()
TheExecutor
instance to be used when processing async method invocations.
getAsyncUncaughtExceptionHandler
@Nullable default AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler()
TheAsyncUncaughtExceptionHandler
instance to be used when an exception is thrown during an asynchronous method execution withvoid
return type.