public abstract class A_CmsReportThread extends java.lang.Thread implements I_CmsReportThread
| Modifier and Type | Field and Description |
|---|---|
protected I_CmsReport |
m_report
The report that belongs to the thread.
|
| Modifier | Constructor and Description |
|---|---|
protected |
A_CmsReportThread(CmsObject cms,
java.lang.String name)
Constructs a new report Thread with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.lang.Object |
getLogChannel()
Returns the logger to which the report output should also be directed.
|
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.
|
java.lang.String |
getReportUpdate(I_CmsReportUpdateFormatter formatter)
Gets the report update content using the specified report update formatter.
|
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)
Deprecated.
|
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, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitstartprotected I_CmsReport m_report
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 java.lang.Throwable getError()
public java.util.List<java.lang.Object> getErrors()
public long getLastEntryTime()
Will return zero if no entry has been written.
public java.lang.Object getLogChannel()
If this returns null, report output is not sent to a logger.
public abstract java.lang.String getReportUpdate()
public java.lang.String getReportUpdate(I_CmsReportUpdateFormatter formatter)
formatter - the report update formatterpublic long getRuntime()
public CmsUUID getUUID()
getUUID in interface I_CmsReportThreadpublic 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 messages@Deprecated protected void initOldHtmlReport(java.util.Locale locale)
This method is reserved for older report threads that still use XML templates to generate their output.
This report type will not work correctly with the new workplace, so don't use it anymore.
locale - the locale for the report output messages