public interface

BranchCallback

com.atlassian.bitbucket.repository.BranchCallback

Class Overview

A callback for streaming branches.

Summary

Public Methods
boolean onBranch(Branch branch)
Called to process a branch.
void onEnd(BranchSummary summary)
Called after the final branch has been streamed.
void onStart(BranchContext context)
Called before the first branch is streamed.

Public Methods

public boolean onBranch (Branch branch)

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

public void onEnd (BranchSummary summary)

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.

public void onStart (BranchContext context)

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.