Package adams.flow.control
Class ArrayProcess.ArrayElementJob
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.multiprocess.AbstractJob
-
- adams.flow.control.ArrayProcess.ArrayElementJob
-
- All Implemented Interfaces:
CleanUpHandler,LoggingLevelHandler,LoggingSupporter,SizeOfHandler,Stoppable,StoppableWithFeedback,Job,Serializable
- Enclosing class:
- ArrayProcess
public static class ArrayProcess.ArrayElementJob extends AbstractJob
For processing a single array element.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Objectm_ArrayElementthe array element.protected intm_ArrayIndexthe index.protected ArrayProcessm_Ownerthe owner.protected SubProcessm_Subthe sub-process used for execution.-
Fields inherited from class adams.multiprocess.AbstractJob
m_Complete, m_ExecutionError, m_JobCompleteListener, m_JobInfo, m_ProgressInfo, m_Stopped
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description ArrayElementJob(ArrayProcess owner, int arrayIndex, Object arrayElement)Initializes the job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.SubProcessgetSub()Returns the underlying SubProcess instance.protected StringpostProcessCheck()Checks whether all post-conditions have been met.protected StringpreProcessCheck()Checks whether all pre-conditions have been met.protected voidprocess()Does the actual execution of the job.StringtoString()Returns a string representation of this job.-
Methods inherited from class adams.multiprocess.AbstractJob
execute, getAdditionalErrorInformation, getExecutionError, getJobCompleteListener, getJobInfo, getProgressInfo, hasExecutionError, isComplete, isStopped, jobCompleted, setJobCompleteListener, setJobInfo, setProgressInfo, stopExecution
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
-
-
-
Field Detail
-
m_Owner
protected ArrayProcess m_Owner
the owner.
-
m_ArrayElement
protected Object m_ArrayElement
the array element.
-
m_ArrayIndex
protected int m_ArrayIndex
the index.
-
m_Sub
protected SubProcess m_Sub
the sub-process used for execution.
-
-
Constructor Detail
-
ArrayElementJob
public ArrayElementJob(ArrayProcess owner, int arrayIndex, Object arrayElement)
Initializes the job.- Parameters:
owner- the ArrayProcess this job belongs toarrayIndex- the index in the arrayarrayElement- the array element at the specified index
-
-
Method Detail
-
getSub
public SubProcess getSub()
Returns the underlying SubProcess instance.- Returns:
- the actor, can be null
-
preProcessCheck
protected String preProcessCheck()
Checks whether all pre-conditions have been met.- Specified by:
preProcessCheckin classAbstractJob- Returns:
- null if everything is OK, otherwise an error message
-
process
protected void process() throws ExceptionDoes the actual execution of the job.- Specified by:
processin classAbstractJob- Throws:
Exception- if fails to execute job
-
postProcessCheck
protected String postProcessCheck()
Checks whether all post-conditions have been met.- Specified by:
postProcessCheckin classAbstractJob- Returns:
- null if everything is OK, otherwise an error message
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory. Removes dependencies and job parameters.- Specified by:
cleanUpin interfaceCleanUpHandler- Specified by:
cleanUpin interfaceJob- Overrides:
cleanUpin classAbstractJob
-
toString
public String toString()
Returns a string representation of this job.- Specified by:
toStringin classAbstractJob- Returns:
- the job as string
-
-