Class AbstractReportThread

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addError​(java.lang.Object obj)
      Adds an error object to the list of errors that occured during the report.
      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<?> getErrors()
      Returns a list of all errors that occured during the report.
      protected java.util.Locale getLocale()  
      protected InterfaceReport 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.
      org.safehaus.uuid.UUID getUUID()
      Returns the UUID of this report thread.
      boolean hasError()
      Returns if the report generated an error output.
      protected void initHtmlReport​(HttpServletRequest request, HttpServletResponse response)
      Initialize a HTML report for this Thread.
      protected void initHtmlReport​(HttpServletRequest request, HttpServletResponse response, boolean writeHtml, boolean isTransient)
      Initialize a HTML report for this Thread.
      protected void initHtmlReport​(HttpServletRequest request, HttpServletResponse response, boolean writeHtml, boolean isTransient, java.lang.String logFileName)  
      boolean isDoomed()
      Returns true if this thread is already "doomed" to be deleted.
      • 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractReportThread

        protected AbstractReportThread​(HttpServletRequest request,
                                       HttpServletResponse response,
                                       java.lang.String name)
        Constructs a new report Thread with the given name.
    • Method Detail

      • getUUID

        public org.safehaus.uuid.UUID getUUID()
        Description copied from interface: InterfaceReportThread
        Returns the UUID of this report thread.

        Specified by:
        getUUID in interface InterfaceReportThread
        Returns:
        the UUID of this report thread
      • addError

        public void addError​(java.lang.Object obj)
        Adds an error object to the list of errors that occured during the report.
        Parameters:
        obj - the error object
      • getError

        public java.lang.Throwable getError()
        Returns the error exception in case there was an error during the execution of this Thread, null otherwise.
        Returns:
        the error exception in case there was an error, null otherwise
      • getErrors

        public java.util.List<?> getErrors()
        Returns a list of all errors that occured during the report.
        Returns:
        an error list that occured during the report
      • getReportUpdate

        public abstract java.lang.String getReportUpdate()
        Returns the part of the report that is ready for output.
        Returns:
        the part of the report that is ready for output
      • getRuntime

        public long getRuntime()
        Returns the time this report has been running.
        Returns:
        the time this report has been running
      • hasError

        public boolean hasError()
        Returns if the report generated an error output.
        Returns:
        true if the report generated an error, otherwise false
      • isDoomed

        public boolean isDoomed()
        Returns true if this thread is already "doomed" to be deleted. A OFBiz deamon Thread (the "Grim Reaper") will collect all doomed Threads, i.e. threads that are not longer active for some time.
        Returns:
        true if this thread is already "doomed" to be deleted
      • getReport

        protected InterfaceReport getReport()
        Returns the report where the output of this Thread is written to.
        Returns:
        the report where the output of this Thread is written to
      • initHtmlReport

        protected void initHtmlReport​(HttpServletRequest request,
                                      HttpServletResponse response,
                                      boolean writeHtml,
                                      boolean isTransient)
        Initialize a HTML report for this Thread.
      • getLocale

        protected java.util.Locale getLocale()