Package hudson.model

Interface ExecutorListener

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
AbstractCloudComputer, Computer, Hudson.MasterComputer, Jenkins.MasterComputer, SlaveComputer

public interface ExecutorListener extends ExtensionPoint
A listener for task related events from executors. A Computer.getRetentionStrategy() or SlaveComputer.getLauncher() may implement this interface. Or you may create an implementation as an extension (since 2.318).
Since:
1.312
Author:
Stephen Connolly
  • Method Details

    • taskAccepted

      default void taskAccepted(Executor executor, Queue.Task task)
      Called whenever a task is accepted by an executor.
      Parameters:
      executor - The executor.
      task - The task.
    • taskStarted

      default void taskStarted(Executor executor, Queue.Task task)
      Called whenever a task is started by an executor.
      Parameters:
      executor - The executor.
      task - The task.
      Since:
      2.318
    • taskCompleted

      default void taskCompleted(Executor executor, Queue.Task task, long durationMS)
      Called whenever a task is completed without any problems by an executor.
      Parameters:
      executor - The executor.
      task - The task.
      durationMS - The number of milliseconds that the task took to complete.
    • taskCompletedWithProblems

      default void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems)
      Called whenever a task is completed with some problems by an executor.
      Parameters:
      executor - The executor.
      task - The task.
      durationMS - The number of milliseconds that the task took to complete.
      problems - The exception that was thrown.