Class AbstractProcessingUnitRunnable
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
-
- All Implemented Interfaces:
IProcessingUnitRunnable,java.lang.Runnable
- Direct Known Subclasses:
ProcessingUnitRunnableImpl
public abstract class AbstractProcessingUnitRunnable extends java.lang.Object implements IProcessingUnitRunnable
AbstractIProcessingUnitRunnableimplementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractProcessingUnitRunnable(java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitContext processingUnitContext)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanafterProcessUnit(boolean continueProcessing)Before process unit method callprotected IProcessingUnitProxycreateProcessingUnitProxy()Create processing unit proxyjava.lang.StringgetId()Get the runnable idlonggetNumberOfUnitsToProcess()Get number of units to processprotected java.util.List<Parameter>getParameterList()Get the parameter listprotected IProcessingProgressgetProcessingProgress()Get the processing progressprotected IProcessingUnitContextgetProcessingUnitContext()Get the processing unit contextprotected ProcessingUnitProxygetProcessingUnitProxy()Get the processing unit proxyIProcessStatusgetProcessStatus()Get the process statusprotected voidsetProcessingUnitProxy(ProcessingUnitProxy processingUnitProxy)Set the processing unit proxy
-
-
-
Constructor Detail
-
AbstractProcessingUnitRunnable
public AbstractProcessingUnitRunnable(java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitContext processingUnitContext)
Constructor- Parameters:
processingUnitClass- the processing unit classparameterList- the parameter listprocessingUnitContext- the processing context.- Throws:
ValidationException- This will be throw in case the consistency check failures.ProcessingException- Throws this exception in case of initialization failures.
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:IProcessingUnitRunnableGet the runnable id- Specified by:
getIdin interfaceIProcessingUnitRunnable- Returns:
- the runnable id
- See Also:
IProcessingUnitRunnable.getId()
-
getProcessStatus
public IProcessStatus getProcessStatus()
Description copied from interface:IProcessingUnitRunnableGet the process status- Specified by:
getProcessStatusin interfaceIProcessingUnitRunnable- Returns:
- the process status
- See Also:
IProcessingUnitRunnable.getProcessStatus()
-
getProcessingProgress
protected IProcessingProgress getProcessingProgress()
Get the processing progress- Returns:
- the processing progress
-
getNumberOfUnitsToProcess
public long getNumberOfUnitsToProcess()
Description copied from interface:IProcessingUnitRunnableGet number of units to process- Specified by:
getNumberOfUnitsToProcessin interfaceIProcessingUnitRunnable- Returns:
- the number of units to process
- See Also:
IProcessingUnitRunnable.getNumberOfUnitsToProcess()
-
getParameterList
protected java.util.List<Parameter> getParameterList()
Get the parameter list- Returns:
- the parameter list
-
getProcessingUnitContext
protected IProcessingUnitContext getProcessingUnitContext()
Get the processing unit context- Returns:
- the processing unit context
-
createProcessingUnitProxy
protected IProcessingUnitProxy createProcessingUnitProxy()
Create processing unit proxy- Returns:
- the processing unit proxy
-
getProcessingUnitProxy
protected ProcessingUnitProxy getProcessingUnitProxy()
Get the processing unit proxy- Returns:
- the processing unit proxy
-
setProcessingUnitProxy
protected void setProcessingUnitProxy(ProcessingUnitProxy processingUnitProxy)
Set the processing unit proxy- Parameters:
processingUnitProxy- the processing unit proxy
-
afterProcessUnit
protected boolean afterProcessUnit(boolean continueProcessing)
Before process unit method call- Parameters:
continueProcessing- the continue processing- Returns:
- the continue processing
-
-