com.jalios.jcms.fileprocessor.processingmanagement
Class ProcessingThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.jalios.jcms.fileprocessor.processingmanagement.ProcessingThread
All Implemented Interfaces:
Runnable

public class ProcessingThread
extends Thread

This 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int MAX_THROWABLE
          Maximum number of throwable allowed per component (processor/parser) before considering it should be removed from repository configuration
static String REVISION
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 ProcessingData getLastProcessingData()
          Retrieve the ProcessingData instance that processed during last loop of this thread.
 boolean isProcessingAlive()
          Tell if the processing of files is alive.
 boolean isProcessingRunning()
          Tell if the processing of files is running (Otherwise, it is stopped, or waiting).
static void resetThrowableCounter()
          Reset all throwable counters.
 void run()
           
 void startProcessing()
           
 void stopProcessing()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final 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:
run in interface Runnable
Overrides:
run in class Thread

isProcessingAlive

public boolean isProcessingAlive()
Tell if the processing of files is alive. The processing might be stopped because it is manualy stopped or because of a repetitive number of unexpected throwable.

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.


stopProcessing

public void stopProcessing()

startProcessing

public void startProcessing()


Copyright © 2001-2010 Jalios SA. All Rights Reserved.