Class DelegatingExecutorFactory


  • public class DelegatingExecutorFactory
    extends Object
    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
    Author:
    Rutger Lubbers, Paul Klos
    • 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.