Example usage for org.springframework.scheduling.annotation AsyncAnnotationAdvisor AsyncAnnotationAdvisor

List of usage examples for org.springframework.scheduling.annotation AsyncAnnotationAdvisor AsyncAnnotationAdvisor

Introduction

In this page you can find the example usage for org.springframework.scheduling.annotation AsyncAnnotationAdvisor AsyncAnnotationAdvisor.

Prototype

@SuppressWarnings("unchecked")
public AsyncAnnotationAdvisor(@Nullable Supplier<Executor> executor,
        @Nullable Supplier<AsyncUncaughtExceptionHandler> exceptionHandler) 

Source Link

Document

Create a new AsyncAnnotationAdvisor for the given task executor.

Usage

From source file:org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor.java

@Override
public void setBeanFactory(BeanFactory beanFactory) {
    super.setBeanFactory(beanFactory);

    AsyncAnnotationAdvisor advisor = new AsyncAnnotationAdvisor(this.executor, this.exceptionHandler);
    if (this.asyncAnnotationType != null) {
        advisor.setAsyncAnnotationType(this.asyncAnnotationType);
    }//from w  w w .  j av a  2s  .com
    advisor.setBeanFactory(beanFactory);
    this.advisor = advisor;
}