Interface BuildMonitor


public interface BuildMonitor
A receiver of build loop messages and events.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The action to take on the next cycle.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    onBuildFail(int cycleNumber, BuildType type, Throwable error)
    Called when a build has failed.
    void
    onBuildStart(int cycleNumber, BuildType type)
    Called when a build is about to start.
    void
    onBuildSuccess(int cycleNumber, BuildType type)
    Called when a build has succeeded.
    void
    onChanged(int cycleNumber, ChangeType type)
    Called when project changes have been detected.
    onCycleEnd(int cycleNumber)
    Called when a build cycle has completed.
    void
    onCycleStart(int cycleNumber)
    Called when a new build cycle is starting.
    void
    onLoopFail(int cycleNumber, Throwable error)
    Called when build loop has failed.
    long
    onReady(int cycleNumber, Project project)
    Called when a build has succeeded or when an initial build was not required.
    void
    Called when the build loop has started.
    void
    Called when build loop has stopped.
    default PrintStream
    Returns a consumer for messages written to stderr.
    default PrintStream
    Returns a consumer for messages written to stdout.
  • Method Details

    • stdOut

      default PrintStream stdOut()
      Returns a consumer for messages written to stdout.
      Returns:
      The consumer.
    • stdErr

      default PrintStream stdErr()
      Returns a consumer for messages written to stderr.
      Returns:
      The consumer.
    • onStarted

      void onStarted()
      Called when the build loop has started.
    • onCycleStart

      void onCycleStart(int cycleNumber)
      Called when a new build cycle is starting.
      Parameters:
      cycleNumber - The cycle number.
    • onChanged

      void onChanged(int cycleNumber, ChangeType type)
      Called when project changes have been detected.
      Parameters:
      cycleNumber - The cycle number.
      type - The change type.
    • onBuildStart

      void onBuildStart(int cycleNumber, BuildType type)
      Called when a build is about to start.
      Parameters:
      cycleNumber - The cycle number.
      type - The build type.
    • onBuildSuccess

      void onBuildSuccess(int cycleNumber, BuildType type)
      Called when a build has succeeded.
      Parameters:
      cycleNumber - The cycle number.
      type - The build type.
    • onBuildFail

      long onBuildFail(int cycleNumber, BuildType type, Throwable error)
      Called when a build has failed.
      Parameters:
      cycleNumber - The cycle number.
      type - The build type.
      error - The error.
      Returns:
      The number of milliseconds to delay before retrying build.
    • onReady

      long onReady(int cycleNumber, Project project)
      Called when a build has succeeded or when an initial build was not required.
      Parameters:
      cycleNumber - The cycle number.
      project - The project.
      Returns:
      The number of milliseconds to delay before restarting the build cycle.
    • onCycleEnd

      BuildMonitor.NextAction onCycleEnd(int cycleNumber)
      Called when a build cycle has completed.
      Parameters:
      cycleNumber - The cycle number.
      Returns:
      true to continue to next build cycle, false to stop.
    • onLoopFail

      void onLoopFail(int cycleNumber, Throwable error)
      Called when build loop has failed.
      Parameters:
      cycleNumber - The cycle number.
      error - The error.
    • onStopped

      void onStopped()
      Called when build loop has stopped.