Package org.springframework.scheduling.annotation

# Class AsyncConfigurationSelector

java.lang.Object
org.springframework.context.annotation.AdviceModeImportSelector<EnableAsync>
org.springframework.scheduling.annotation.AsyncConfigurationSelector

All Implemented Interfaces:
  `ImportSelector`

public class AsyncConfigurationSelector extends AdviceModeImportSelector<EnableAsync>
Selects which implementation of `AbstractAsyncConfiguration` should be used based on the value of `EnableAsync.mode()` on the importing `@Configuration` class.

Since:
  3.1
Author:
  Chris Beams, Juergen Hoeller
See Also:
  - `EnableAsync`
  - `ProxyAsyncConfiguration`

## Field Summary

### Fields inherited from class org.springframework.context.annotation.AdviceModeImportSelector

`DEFAULT_ADVICE_MODE_ATTRIBUTE_NAME`

## Constructor Summary

Constructors
Constructor
Description
`AsyncConfigurationSelector()`

## Method Summary

Modifier and Type
Method
Description
`String[]`
`selectImports(AdviceMode adviceMode)`
Returns `ProxyAsyncConfiguration` or `AspectJAsyncConfiguration` for `PROXY` and `ASPECTJ` values of `EnableAsync.mode()`, respectively.

### Methods inherited from class org.springframework.context.annotation.AdviceModeImportSelector

`getAdviceModeAttributeName, selectImports`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.context.annotation.ImportSelector

`getExclusionFilter`

## Constructor Details

### AsyncConfigurationSelector

public AsyncConfigurationSelector()

## Method Details

### selectImports

@NonNull public String[] selectImports(AdviceMode adviceMode)
Returns `ProxyAsyncConfiguration` or `AspectJAsyncConfiguration` for `PROXY` and `ASPECTJ` values of `EnableAsync.mode()`, respectively.

Specified by:
  `selectImports` in class `AdviceModeImportSelector<EnableAsync>`
Parameters:
  `adviceMode` - the value of the advice mode attribute for the annotation specified via generics.
Returns:
  array containing classes to import (empty array if none; `null` if the given `AdviceMode` is unknown)