Package org.hawaiiframework.async.config
Class DelegatingExecutorFactory
java.lang.Object
org.hawaiiframework.async.config.DelegatingExecutorFactory
Utility to initialize executors for the asynchronous execution of methods using the @
Asyncannotation.
From the configuration, method per system an executor is registered to be used in the
@Async("system.method") annotation.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingExecutorFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, BeanRegistrar registrar, ExecutorConfigurationProperties configuration, Set<String> executorNames) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate bean aliases for the configured systems.
-
Constructor Details
-
DelegatingExecutorFactory
public DelegatingExecutorFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, BeanRegistrar registrar, ExecutorConfigurationProperties configuration, Set<String> executorNames) The constructor.- Parameters:
beanFactory- Spring's bean factory.registrar- Utility to register beans in Spring.configuration- The executor configuration.executorNames- The set of executor names.
-
-
Method Details
-
createDelegatingExecutors
public void createDelegatingExecutors()Create bean aliases for the configured systems.For each task in the system an
DelegatingExecutoris created with the relevant executor as its delegate. This is either the configured executor for the task, or the task's system default executor.If neither have a configured executor, no alias is created and the call will default to the default executor.
-