Interface BranchCallback


public interface BranchCallback
A callback for streaming branches.
Since:
4.6
  • Method Details

    • onBranch

      default boolean onBranch(@Nonnull Branch branch) throws IOException
      Called to process a branch.
      Parameters:
      branch - the branch to stream
      Returns:
      true if further branches should be streamed; otherwise, false to stop streaming
      Throws:
      IOException - may be thrown by implementations which perform I/O.
    • onEnd

      default void onEnd(@Nonnull BranchSummary summary) throws IOException
      Called after the final branch has been streamed.

      Note: If there were no refs, this method may be called immediately after onStart(BranchContext) without any calls to onBranch(Branch).

      Parameters:
      summary - summarizes the request and the streamed refs
      Throws:
      IOException - may be thrown by implementations which perform I/O.
    • onStart

      default void onStart(@Nonnull BranchContext context) throws IOException
      Called before the first branch is streamed.
      Parameters:
      context - provides details about the request for which refs are being streamed
      Throws:
      IOException - may be thrown by implementations which perform I/O.