Package com.logicaldoc.core.threading
Class NotifyingThread
java.lang.Object
java.lang.Thread
com.logicaldoc.core.threading.NotifyingThread
- All Implemented Interfaces:
- Runnable
A Thread that notifies it's listeners about the end of the elaboration and
 also measures the execution time.
- Since:
- 8.5.3
- Author:
- Marco Meschieri - LogicalDOC
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to be implemented by the listenersNested classes/interfaces inherited from class java.lang.ThreadThread.State, Thread.UncaughtExceptionHandler
- 
Field SummaryFields inherited from class java.lang.ThreadMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
- 
Constructor SummaryConstructorsConstructorDescriptionNotifyingThread(Runnable target, String name) NotifyingThread(String name) NotifyingThread(ThreadGroup group, String name) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidvoiddoRun()Concrete implementations should override this method to implement their own processing.longGets the elapsed time since the begin of the execution until now o until the end of the thread's executiongetError()booleanisOver()Checks if the thread has finishedfinal voidfinal voidrun()Methods inherited from class java.lang.ThreadactiveCount, checkAccess, 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
- 
Constructor Details- 
NotifyingThreadpublic NotifyingThread()
- 
NotifyingThread
- 
NotifyingThread
- 
NotifyingThread
 
- 
- 
Method Details- 
addListener
- 
removeListener
- 
getElapsedTimepublic long getElapsedTime()Gets the elapsed time since the begin of the execution until now o until the end of the thread's execution- Returns:
- the elapsed time in milliseconds
 
- 
isOverpublic boolean isOver()Checks if the thread has finished- Returns:
- if the it has finished
 
- 
runpublic final void run()
- 
doRunpublic void doRun()Concrete implementations should override this method to implement their own processing.
- 
getError
 
-