Package org.hawaiiframework.async.config
Class DelegatingExecutorFactory
- java.lang.Object
-
- org.hawaiiframework.async.config.DelegatingExecutorFactory
-
public class DelegatingExecutorFactory extends Object
Utility to initialize executors for the asynchronous execution of methods using the @Async
annotation.From the configuration, method per system an executor is registered to be used in the
@Async("system.method")
annotation.- Since:
- 3.0.0
- Author:
- Rutger Lubbers, Paul Klos
-
-
Constructor Summary
Constructors Constructor Description DelegatingExecutorFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, BeanRegistrar registrar, ExecutorConfigurationProperties configuration, Set<String> executorNames)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createDelegatingExecutors()
Create bean aliases for the configured systems.
-
-
-
Constructor Detail
-
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 Detail
-
createDelegatingExecutors
public void createDelegatingExecutors()
Create bean aliases for the configured systems.For each task in the system an
DelegatingExecutor
is 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.
-
-