Interface BranchCallback
public interface BranchCallback
A callback for streaming
branches
.- Since:
- 4.6
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Called to process abranch
.default void
onEnd
(BranchSummary summary) Called after the finalbranch
has been streamed.default void
onStart
(BranchContext context) Called before the firstbranch
is streamed.
-
Method Details
-
onBranch
Called to process abranch
.- Parameters:
branch
- thebranch
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
Called after the finalbranch
has been streamed.Note: If there were no refs, this method may be called immediately after
onStart(BranchContext)
without any calls toonBranch(Branch)
.- Parameters:
summary
- summarizes the request and the streamed refs- Throws:
IOException
- may be thrown by implementations which perform I/O.
-
onStart
Called before the firstbranch
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.
-