Class ProcessExecutorFactory
java.lang.Object
de.hybris.platform.mediaconversion.os.process.factory.ProcessExecutorFactory
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty key prefix for operation specific process executor flavor setup. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Creates a newProcessExecutor.protected ProcessExecutorCreates the 'core' process executor for the specified configured 'flavor'.protected ProcessExecutorChooses which os specificProcessExecutorto create and return it.voiddestroy()Destroys all createdProcessExecutorinstances created by this factory.intgetLimit()Gets the maximum amount of parallel process to execute (if positive).protected StringAccesses 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 Details
-
CONFIGURATION_KEY_PREFIX
Property key prefix for operation specific process executor flavor setup.- See Also:
-
-
Constructor Details
-
ProcessExecutorFactory
public ProcessExecutorFactory()
-
-
Method Details
-
create
Creates a newProcessExecutor. This method is- Returns:
- a new
ProcessExecutor
-
destroy
public void destroy()Destroys all createdProcessExecutorinstances created by this factory. -
createOSSpecific
Chooses which os specificProcessExecutorto create and return it.- Returns:
- the
ProcessExecutorinstance ot use.
-
create
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
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
-
setConfigurationService
-
getRmiRegistryService
-
setRmiRegistryService
-
getOsConfigurationService
-
setOsConfigurationService
-
getProcessContextRegistry
-
setProcessContextRegistry
-