Async
annotation. This annotation can be used at the method and type level in
implementation classes as well as in service interfaces.
This advisor detects the EJB 3.1 jakarta.ejb.Asynchronous
annotation as well, treating it exactly like Spring's own Async.
Furthermore, a custom async annotation type may get specified through the
"asyncAnnotationType" property.
Async, AnnotationAsyncExecutionInterceptor
| Access | Constructor and Description |
|---|---|
| public | |
| public | AsyncAnnotationAdvisor(Executor
the task executor to use for asynchronous methods
(can be executor, AsyncUncaughtExceptionHandler null to trigger default executor resolution)the exceptionHandler)AsyncUncaughtExceptionHandler to use to
handle unexpected exception thrown by asynchronous method executionsCreate a new |
| public | AsyncAnnotationAdvisor(Supplier<Executor>
the task executor to use for asynchronous methods
(can be executor, Supplier<AsyncUncaughtExceptionHandler> null to trigger default executor resolution)the exceptionHandler)AsyncUncaughtExceptionHandler to use to
handle unexpected exception thrown by asynchronous method executionsCreate a new |
| Modifier and Type | Method and Description |
|---|---|
| protected Advice | |
| protected Pointcut | Returns: the applicable Pointcut object, ornull if nonethe async annotation types to introspect asyncAnnotationTypes)Calculate a pointcut for the given async annotation types, if any. |
| public Advice | getAdvice()
Implements org. |
| public Pointcut | getPointcut()
Implements org. |
| public void | setAsyncAnnotationType(Class<? extends Annotation>
the desired annotation type asyncAnnotationType)Set the 'async' annotation type. |
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Implements org. BeanFactory to be used when looking up executors by qualifier.
|
| advice | back to summary |
|---|---|
| private final Advice advice | |
| pointcut | back to summary |
|---|---|
| private Pointcut pointcut | |
| AsyncAnnotationAdvisor | back to summary |
|---|---|
| public AsyncAnnotationAdvisor() Create a new | |
| AsyncAnnotationAdvisor | back to summary |
|---|---|
| public AsyncAnnotationAdvisor(Executor executor, AsyncUncaughtExceptionHandler exceptionHandler) Create a new
| |
| AsyncAnnotationAdvisor | back to summary |
|---|---|
| public AsyncAnnotationAdvisor(Supplier<Executor> executor, Supplier<AsyncUncaughtExceptionHandler> exceptionHandler) Create a new
| |
| buildAdvice | back to summary |
|---|---|
| protected Advice buildAdvice(Supplier<Executor> executor, Supplier<AsyncUncaughtExceptionHandler> exceptionHandler) | |
| buildPointcut | back to summary |
|---|---|
| protected Pointcut buildPointcut(Set<Class<? extends Annotation>> asyncAnnotationTypes) Calculate a pointcut for the given async annotation types, if any.
| |
| getAdvice | back to summary |
|---|---|
| public Advice getAdvice() Implements org. Doc from org. Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc. | |
| getPointcut | back to summary |
|---|---|
| public Pointcut getPointcut() Implements org. Doc from org. Get the Pointcut that drives this advisor.
| |
| setAsyncAnnotationType | back to summary |
|---|---|
| public void setAsyncAnnotationType(Class<? extends Annotation> asyncAnnotationType) Set the 'async' annotation type. The default async annotation type is the This setter property exists so that developers can provide their own (non-Spring-specific) annotation type to indicate that a method is to be executed asynchronously.
| |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) Implements org. Set the
| |