Class AbstractProcessingUnitRunnable
- java.lang.Object
-
- com.github.toolarium.processing.unit.runtime.runnable.impl.AbstractProcessingUnitRunnable
-
- All Implemented Interfaces:
IProcessingUnitRunnable
- Direct Known Subclasses:
ProcessingUnitRunnable
public abstract class AbstractProcessingUnitRunnable extends java.lang.Object implements IProcessingUnitRunnable
AbstractIProcessingUnitRunnableimplementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractProcessingUnitRunnable(byte[] suspendedState)ConstructorAbstractProcessingUnitRunnable(java.lang.String id, java.lang.String name, 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 ProcessingUnitProxycreateProcessingUnitProxy()Create processing unit proxylonggetDuration()Get the duration in millisecondsjava.lang.StringgetId()Get the runnable idjava.lang.StringgetName()Get the runnable name or nullprotected java.util.List<Parameter>getParameterList()Get the parameter listProcessingActionStatusgetProcessingActionStatus()Get the processing action statusprotected IProcessingProgressgetProcessingProgress()Get the processing progressProcessingRuntimeStatusgetProcessingRuntimeStatus()Get the processing runtime statusprotected IProcessingUnitContextgetProcessingUnitContext()Get the processing unit contextprotected ProcessingUnitProxygetProcessingUnitProxy()Get the processing unit proxyIProcessStatusgetProcessStatus()Get the process statusjava.time.InstantgetStartTimestamp()Get the start time stampjava.util.List<java.lang.String>getStatusMessageList()Get the status message listjava.time.InstantgetStopTimestamp()Get the stop time stampprotected voidnotifyProcessingUnitState(ProcessingActionStatus processingActionStatus)Notify processing unit action statusprotected voidsetProcessingActionStatus(ProcessingActionStatus processingActionStatus)Sets the processing action statusprotected voidsetProcessingUnitProxy(ProcessingUnitProxy processingUnitProxy)Set the processing unit proxyprotected voidsetProcessingUnitRunnableListener(IProcessingUnitRunnableListener processingUnitRunnableListener)Set the processing unit runnable listener
-
-
-
Constructor Detail
-
AbstractProcessingUnitRunnable
public AbstractProcessingUnitRunnable(java.lang.String id, java.lang.String name, java.lang.Class<? extends IProcessingUnit> processingUnitClass, java.util.List<Parameter> parameterList, IProcessingUnitContext processingUnitContext)Constructor- Parameters:
id- the unique id of this processingname- the name of this processing unit runnableprocessingUnitClass- 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.
-
AbstractProcessingUnitRunnable
public AbstractProcessingUnitRunnable(byte[] suspendedState)
Constructor- Parameters:
suspendedState- the suspended state- 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()
-
getName
public java.lang.String getName()
Description copied from interface:IProcessingUnitRunnableGet the runnable name or null- Specified by:
getNamein interfaceIProcessingUnitRunnable- Returns:
- the name or null
- See Also:
IProcessingUnitRunnable.getName()
-
getProcessingActionStatus
public ProcessingActionStatus getProcessingActionStatus()
Description copied from interface:IProcessingUnitRunnableGet the processing action status- Specified by:
getProcessingActionStatusin interfaceIProcessingUnitRunnable- Returns:
- the processing action status
- See Also:
IProcessingUnitRunnable.getProcessingActionStatus()
-
setProcessingActionStatus
protected void setProcessingActionStatus(ProcessingActionStatus processingActionStatus)
Sets the processing action status- Parameters:
processingActionStatus- the processing action status
-
getProcessStatus
public IProcessStatus getProcessStatus()
Description copied from interface:IProcessingUnitRunnableGet the process status- Specified by:
getProcessStatusin interfaceIProcessingUnitRunnable- Returns:
- the process status
- See Also:
IProcessingUnitRunnable.getProcessStatus()
-
getProcessingRuntimeStatus
public ProcessingRuntimeStatus getProcessingRuntimeStatus()
Description copied from interface:IProcessingUnitRunnableGet the processing runtime status- Specified by:
getProcessingRuntimeStatusin interfaceIProcessingUnitRunnable- Returns:
- the processing runtime status
- See Also:
IProcessingUnitRunnable.getProcessingRuntimeStatus()
-
getStatusMessageList
public java.util.List<java.lang.String> getStatusMessageList()
Description copied from interface:IProcessingUnitRunnableGet the status message list- Specified by:
getStatusMessageListin interfaceIProcessingUnitRunnable- Returns:
- the status message list
- See Also:
IProcessingUnitRunnable.getStatusMessageList()
-
getStartTimestamp
public java.time.Instant getStartTimestamp()
Description copied from interface:IProcessingUnitRunnableGet the start time stamp- Specified by:
getStartTimestampin interfaceIProcessingUnitRunnable- Returns:
- the start time stamp
- See Also:
IProcessingUnitRunnable.getStartTimestamp()
-
getStopTimestamp
public java.time.Instant getStopTimestamp()
Description copied from interface:IProcessingUnitRunnableGet the stop time stamp- Specified by:
getStopTimestampin interfaceIProcessingUnitRunnable- Returns:
- the stop time stamp
- See Also:
IProcessingUnitRunnable.getStopTimestamp()
-
getDuration
public long getDuration()
Description copied from interface:IProcessingUnitRunnableGet the duration in milliseconds- Specified by:
getDurationin interfaceIProcessingUnitRunnable- Returns:
- the duration
- See Also:
IProcessingUnitRunnable.getDuration()
-
getProcessingProgress
protected IProcessingProgress getProcessingProgress()
Get the processing progress- Returns:
- the processing progress
-
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 ProcessingUnitProxy 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
-
setProcessingUnitRunnableListener
protected void setProcessingUnitRunnableListener(IProcessingUnitRunnableListener processingUnitRunnableListener)
Set the processing unit runnable listener- Parameters:
processingUnitRunnableListener- the processing unit runnable listener
-
notifyProcessingUnitState
protected void notifyProcessingUnitState(ProcessingActionStatus processingActionStatus)
Notify processing unit action status- Parameters:
processingActionStatus- the processing action status
-
-