Class ProcessingThread
- java.lang.Object
 - 
- java.lang.Thread
 - 
- com.jalios.jcms.fileprocessor.processingmanagement.ProcessingThread
 
 
 
- 
- All Implemented Interfaces:
 java.lang.Runnable
public class ProcessingThread extends java.lang.ThreadThis class is a Thread of processing. ProcessingData are submitted to this thread with a producer/consumer mecanism. This thread may be started and stopped through FileProcessorManager. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intMAX_THROWABLEMaximum number of throwable allowed per component (processor/parser) before considering it should be removed from repository configurationstatic java.lang.StringREVISION 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProcessingDatagetLastProcessingData()Retrieve the ProcessingData instance that processed during last loop of this thread.booleanisProcessingAlive()Tell if the processing of files is alive (which is expected at all time after JCMS startup, even if FileProcessor is disabled, otherwise a complete restart is required).booleanisProcessingRunning()Tell if the processing of files is running (Otherwise, it is stopped, or waiting).static voidresetThrowableCounter()Reset all throwable counters.voidrun()- 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield 
 - 
 
 - 
 
- 
- 
Field Detail
- 
REVISION
public static final java.lang.String REVISION
- See Also:
 - Constant Field Values
 
 
- 
MAX_THROWABLE
public static final int MAX_THROWABLE
Maximum number of throwable allowed per component (processor/parser) before considering it should be removed from repository configuration- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
run
public void run()
- Specified by:
 runin interfacejava.lang.Runnable- Overrides:
 runin classjava.lang.Thread
 
- 
isProcessingAlive
public boolean isProcessingAlive()
Tell if the processing of files is alive (which is expected at all time after JCMS startup, even if FileProcessor is disabled, otherwise a complete restart is required).- Returns:
 - true if the processing is currently not stopped
 
 
- 
isProcessingRunning
public boolean isProcessingRunning()
Tell if the processing of files is running (Otherwise, it is stopped, or waiting).- Returns:
 - true if the processing is currently running
 
 
- 
getLastProcessingData
public ProcessingData getLastProcessingData()
Retrieve the ProcessingData instance that processed during last loop of this thread.- Returns:
 - a ProcessingData instance or null if no processing has yet occured.
 
 
- 
resetThrowableCounter
public static void resetThrowableCounter()
Reset all throwable counters.Used during unit test in which processors voluntarly triggers failures but do not want to be excluded.
 
 - 
 
 -