Class ProcessExecutorFactory
- java.lang.Object
-
- de.hybris.platform.mediaconversion.os.process.factory.ProcessExecutorFactory
-
public class ProcessExecutorFactory extends java.lang.ObjectFactory bean creating aProcessExecutorinstance. As the creation and assembly of aProcessExecutoris not trivial this has been moved to this Factory bean.The
ProcessExecutorcreated depends on the operation system and the associated property configuration. Furthermore theProcessExecutormight be wrapped by aLimitedProcessExecutorto restrict the amount of parallel processes at a time.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIGURATION_KEY_PREFIXProperty key prefix for operation specific process executor flavor setup.
-
Constructor Summary
Constructors Constructor Description ProcessExecutorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessExecutorcreate()Creates a newProcessExecutor.protected ProcessExecutorcreate(java.lang.String flavor)Creates the 'core' process executor for the specified configured 'flavor'.protected ProcessExecutorcreateOSSpecific()Chooses which os specificProcessExecutorto create and return it.voiddestroy()Destroys all createdProcessExecutorinstances created by this factory.ConfigurationServicegetConfigurationService()intgetLimit()Gets the maximum amount of parallel process to execute (if positive).OsConfigurationServicegetOsConfigurationService()ProcessContextRegistrygetProcessContextRegistry()RMIRegistryServicegetRmiRegistryService()protected java.lang.StringgetTenantId()Accesses the current tenant's id.voidsetConfigurationService(ConfigurationService configurationService)voidsetLimit(int limit)Sets the maximum amount of parallel processes.voidsetOsConfigurationService(OsConfigurationService osConfigurationService)voidsetProcessContextRegistry(ProcessContextRegistry processContextRegistry)voidsetRmiRegistryService(RMIRegistryService rmiRegistryService)
-
-
-
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
-
-
Method Detail
-
create
public ProcessExecutor create()
Creates a newProcessExecutor. This method is- Returns:
- a new
ProcessExecutor
-
destroy
public void destroy()
Destroys all createdProcessExecutorinstances created by this factory.
-
createOSSpecific
protected ProcessExecutor createOSSpecific()
Chooses which os specificProcessExecutorto create and return it.- Returns:
- the
ProcessExecutorinstance ot use.
-
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.
-
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)
-
-