Interface Task

All Known Implementing Classes:
FailingPocTask, IndexTask, InterruptablePocTask, PocTask

public interface Task
  • Field Details

  • Method Details

    • getType

      TaskType getType()
      Get the type of the task. Implement this method to return the key for the type of task. This must be a read-only property.
      Returns:
      the type of task
    • getDescription

      String getDescription()
      Get the description of the task.
      Returns:
      the description
    • setDescription

      void setDescription(String description)
      Set the description of the task.
      Parameters:
      description - the description
    • taskProgress

      default void taskProgress(TaskProgressEvent event)
      Handle the task progress event. Override this method to handle the progress of the task, e.g. by emitting ServerSentEvents. The default is a no-op.
      Parameters:
      event - the task progress event
    • isInterruptable

      default boolean isInterruptable()
      Determine if this task can be stopped on demand (implements InterruptableJob).
      Returns:
      true if the task can be stopped on demand, false otherwise
      See Also:
      • InterruptableJob