Interface Task<U,V extends Task<U,V>>

Type Parameters:
U - the type of task result
V - the type of the task
All Known Subinterfaces:
ArchiveTask, BuildJmodTask, BuildRuntimeTask, ContainerizeTask, DebugTask, ExecTask<U,V>, ModularizeDependenciesTask, PackageApplicationTask, RunTask, StartTask, StopTask

public interface Task<U,V extends Task<U,V>>

A build task.

Since:
1.4
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    doOnComplete(Consumer<U> onComplete)
    Adds behaviour when the task is executed successfully.
    Executes the task.
  • Method Details

    • doOnComplete

      V doOnComplete(Consumer<U> onComplete)

      Adds behaviour when the task is executed successfully.

      Parameters:
      onComplete - the callback invoked with the task execution result
      Returns:
      the task
    • execute

      U execute() throws TaskExecutionException

      Executes the task.

      Returns:
      the task execution result
      Throws:
      TaskExecutionException - if an error was raised during the execution of the task