Class ProcessExecutorFactory


  • public class ProcessExecutorFactory
    extends java.lang.Object
    Factory bean creating a ProcessExecutor instance. As the creation and assembly of a ProcessExecutor is not trivial this has been moved to this Factory bean.

    The ProcessExecutor created depends on the operation system and the associated property configuration. Furthermore the ProcessExecutor might be wrapped by a LimitedProcessExecutor to restrict the amount of parallel processes at a time.

    • Field Detail

      • CONFIGURATION_KEY_PREFIX

        public static final java.lang.String CONFIGURATION_KEY_PREFIX
        Property key prefix for operation specific process executor flavor setup.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ProcessExecutorFactory

        public ProcessExecutorFactory()
    • Method Detail

      • destroy

        public void destroy()
        Destroys all created ProcessExecutor instances created by this factory.
      • create

        protected ProcessExecutor create​(java.lang.String flavor)
        Creates the 'core' process executor for the specified configured 'flavor'.
        Parameters:
        flavor - the configured flavor
        Returns:
        the core ProcessExecutor implementation to use. This instance might get wrapped to add further features.
        Throws:
        java.lang.IllegalArgumentException - if the specified flavor is not supported.
      • getTenantId

        protected java.lang.String getTenantId()
        Accesses the current tenant's id.
        Returns:
        the current tenant's id.
      • getLimit

        public int getLimit()
        Gets the maximum amount of parallel process to execute (if positive).
        Returns:
        the maximum amount of parallel processes.
      • setLimit

        public void setLimit​(int limit)
        Sets the maximum amount of parallel processes.
        Parameters:
        limit - the maximum parallel process number.
      • setConfigurationService

        public void setConfigurationService​(ConfigurationService configurationService)
      • setRmiRegistryService

        public void setRmiRegistryService​(RMIRegistryService rmiRegistryService)
      • setOsConfigurationService

        public void setOsConfigurationService​(OsConfigurationService osConfigurationService)
      • setProcessContextRegistry

        public void setProcessContextRegistry​(ProcessContextRegistry processContextRegistry)