Class ProcessExecutorFactory

java.lang.Object
de.hybris.platform.mediaconversion.os.process.factory.ProcessExecutorFactory

public class ProcessExecutorFactory extends 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 Details

    • CONFIGURATION_KEY_PREFIX

      public static final String CONFIGURATION_KEY_PREFIX
      Property key prefix for operation specific process executor flavor setup.
      See Also:
  • Constructor Details

    • ProcessExecutorFactory

      public ProcessExecutorFactory()
  • Method Details

    • create

      public ProcessExecutor create()
      Creates a new ProcessExecutor. This method is
      Returns:
      a new ProcessExecutor
    • destroy

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

      protected ProcessExecutor createOSSpecific()
      Chooses which os specific ProcessExecutor to create and return it.
      Returns:
      the ProcessExecutor instance ot use.
    • create

      protected ProcessExecutor create(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:
      IllegalArgumentException - if the specified flavor is not supported.
    • getTenantId

      protected 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.
    • getConfigurationService

      public ConfigurationService getConfigurationService()
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
    • getRmiRegistryService

      public RMIRegistryService getRmiRegistryService()
    • setRmiRegistryService

      public void setRmiRegistryService(RMIRegistryService rmiRegistryService)
    • getOsConfigurationService

      public OsConfigurationService getOsConfigurationService()
    • setOsConfigurationService

      public void setOsConfigurationService(OsConfigurationService osConfigurationService)
    • getProcessContextRegistry

      public ProcessContextRegistry getProcessContextRegistry()
    • setProcessContextRegistry

      public void setProcessContextRegistry(ProcessContextRegistry processContextRegistry)