Package hudson.model

Class AsyncAperiodicWork

All Implemented Interfaces:
ExtensionPoint, Runnable

public abstract class AsyncAperiodicWork extends AperiodicWork
AperiodicWork that takes a long time to run. Similar to AsyncPeriodicWork, see AsyncPeriodicWork for details and AperiodicWork for differences between AperiodicWork and PeriodicWork.
Since:
1.410
Author:
vjuranek
  • Field Details

    • name

      public final String name
      Name of the work.
  • Constructor Details

    • AsyncAperiodicWork

      protected AsyncAperiodicWork(String name)
  • Method Details

    • doAperiodicRun

      public final void doAperiodicRun()
      Schedules this periodic work now in a new thread, if one isn't already running.
      Specified by:
      doAperiodicRun in class AperiodicWork
    • createListener

      protected StreamTaskListener createListener()
    • getLogFile

      protected File getLogFile()
      Determines the log file that records the result of this task.
    • getNormalLoggingLevel

      protected Level getNormalLoggingLevel()
      Returns the logging level at which normal messages are displayed.
      Returns:
      The logging level.
      Since:
      1.651
    • getSlowLoggingLevel

      protected Level getSlowLoggingLevel()
      Returns the logging level at which previous task still executing messages is displayed.
      Returns:
      The logging level.
      Since:
      1.651
    • getErrorLoggingLevel

      protected Level getErrorLoggingLevel()
      Returns the logging level at which error messages are displayed.
      Returns:
      The logging level.
      Since:
      1.651
    • execute

      protected abstract void execute(TaskListener listener) throws IOException, InterruptedException
      Executes the task.
      Parameters:
      listener - Output sent will be reported to the users. (this work is TBD.)
      Throws:
      InterruptedException - The caller will record the exception and moves on.
      IOException - The caller will record the exception and moves on.