public abstract class A_CmsReportThread extends java.lang.Thread implements I_CmsReportThread
限定符 | 构造器和说明 |
---|---|
protected |
A_CmsReportThread(CmsObject cms,
java.lang.String name)
Constructs a new report Thread with the given name.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addError(java.lang.Object obj)
Adds an error object to the list of errors that occurred during the report.
|
protected CmsObject |
getCms()
Returns the OpenCms context object this Thread is initialized with.
|
java.lang.Throwable |
getError()
Returns the error exception in case there was an error during the execution of
this Thread, null otherwise.
|
java.util.List<java.lang.Object> |
getErrors()
Returns a list of all errors that occurred during the report.
|
long |
getLastEntryTime()
Returns the time of last report entry.
|
protected I_CmsReport |
getReport()
Returns the report where the output of this Thread is written to.
|
abstract java.lang.String |
getReportUpdate()
Returns the part of the report that is ready for output.
|
long |
getRuntime()
Returns the time this report has been running.
|
CmsUUID |
getUUID()
Returns the OpenCms UUID of this report thread.
|
boolean |
hasError()
Returns if the report generated an error output.
|
protected void |
initHtmlReport(java.util.Locale locale)
Initialize a HTML report for this Thread.
|
protected void |
initOldHtmlReport(java.util.Locale locale)
Initialize a HTML report for this Thread.
|
boolean |
isDoomed()
Returns true if this thread is already "doomed" to be deleted.
|
activeCount, checkAccess, clone, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
start
protected A_CmsReportThread(CmsObject cms, java.lang.String name)
cms
- the current OpenCms context objectname
- the name of the Threadpublic void addError(java.lang.Object obj)
obj
- the error objectpublic long getLastEntryTime()
Will return zero if no entry has been written.
public java.lang.Throwable getError()
public java.util.List<java.lang.Object> getErrors()
public abstract java.lang.String getReportUpdate()
public long getRuntime()
public CmsUUID getUUID()
getUUID
在接口中 I_CmsReportThread
public boolean hasError()
public boolean isDoomed()
A OpenCms deamon Thread (the "Grim Reaper") will collect all doomed Threads, i.e. threads that are not longer active for some time.
protected CmsObject getCms()
protected I_CmsReport getReport()
protected void initHtmlReport(java.util.Locale locale)
locale
- the locale for the report output messagesprotected void initOldHtmlReport(java.util.Locale locale)
This method is reserved for older report threads that still use XML templates to generate their output.
locale
- the locale for the report output messages