Class ProcessingEngineImpl
- java.lang.Object
-
- com.github.toolarium.processing.engine.impl.ProcessingEngineImpl
-
- All Implemented Interfaces:
IProcessEngine
public class ProcessingEngineImpl extends java.lang.Object implements IProcessEngine
Implements theIProcessEngine.
-
-
Constructor Summary
Constructors Constructor Description ProcessingEngineImpl()Constructor for ProcessingEngineImplProcessingEngineImpl(byte[] persistedContent)Constructor for ProcessingEngineImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(IProcessingListener listener)Add aIProcessingListener.java.util.List<com.github.toolarium.processing.unit.runtime.runnable.IProcessingUnitRunnable>execute(byte[] persistedContent)Execute the persisted process unitscom.github.toolarium.processing.unit.runtime.runnable.IProcessingUnitRunnableexecute(java.lang.String id, java.lang.String name, java.lang.String processingUnitClass, java.util.List<com.github.toolarium.processing.unit.dto.Parameter> parameterList)Execute the process unitjava.lang.StringgetInstanceName()Get the process engine instance nameIProcessingUnitRegistrygetProcessingUnitRegistry()Get the processing unit registryIProcessingEngineStatusgetStatus()Get the status backvoidsetInstanceName(java.lang.String instanceName)Sets the instance namebyte[]shutdown()Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
-
-
-
Method Detail
-
getInstanceName
public java.lang.String getInstanceName()
Description copied from interface:IProcessEngineGet the process engine instance name- Specified by:
getInstanceNamein interfaceIProcessEngine- Returns:
- the process engine instance name
- See Also:
IProcessEngine.getInstanceName()
-
setInstanceName
public void setInstanceName(java.lang.String instanceName)
Sets the instance name- Parameters:
instanceName- the instance name
-
getProcessingUnitRegistry
public IProcessingUnitRegistry getProcessingUnitRegistry()
Get the processing unit registry- Specified by:
getProcessingUnitRegistryin interfaceIProcessEngine- Returns:
- the processing unit registry
-
execute
public com.github.toolarium.processing.unit.runtime.runnable.IProcessingUnitRunnable execute(java.lang.String id, java.lang.String name, java.lang.String processingUnitClass, java.util.List<com.github.toolarium.processing.unit.dto.Parameter> parameterList)Description copied from interface:IProcessEngineExecute the process unit- Specified by:
executein interfaceIProcessEngine- Parameters:
id- the id of the execution or nullname- the name of the executionprocessingUnitClass- the process unit classparameterList- the parameter list- Returns:
- the added
IProcessingUnitRunnable. - See Also:
IProcessEngine.execute(java.lang.String, java.lang.String, java.lang.String, java.util.List)
-
execute
public java.util.List<com.github.toolarium.processing.unit.runtime.runnable.IProcessingUnitRunnable> execute(byte[] persistedContent)
Description copied from interface:IProcessEngineExecute the persisted process units- Specified by:
executein interfaceIProcessEngine- Parameters:
persistedContent- the persisted content from a shutdown- Returns:
- the added
IProcessingUnitRunnablelist. - See Also:
IProcessEngine.execute(byte[])
-
getStatus
public IProcessingEngineStatus getStatus()
Description copied from interface:IProcessEngineGet the status back- Specified by:
getStatusin interfaceIProcessEngine- Returns:
- the status
- See Also:
IProcessEngine.getStatus()
-
addListener
public void addListener(IProcessingListener listener)
Description copied from interface:IProcessEngineAdd aIProcessingListener.- Specified by:
addListenerin interfaceIProcessEngine- Parameters:
listener- the listener to add- See Also:
IProcessEngine.addListener(com.github.toolarium.processing.engine.IProcessingListener)
-
shutdown
public byte[] shutdown()
Description copied from interface:IProcessEngineInitiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down.- Specified by:
shutdownin interfaceIProcessEngine- Returns:
- the processing suspended state
- See Also:
IProcessEngine.shutdown()
-
-