Interface GitAnnotatedTagCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for
streaming annotated tags- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonEnd(GitAnnotatedTagSummary summary) Called after the finaltaghas been streamed.default booleanCalled when one of the provided hashes was not found in the repositorydefault booleanonOtherType(String objectHash, GitObjectType objectType) Called when one of the provided hashes identifies an object that is not a tag object.default voidonStart(GitAnnotatedTagContext context) Called before the firsttagis streamed.booleanonTag(GitAnnotatedTag tag) Receives a fully-populatedtagfor processing.
-
Method Details
-
onEnd
Called after the finaltaghas been streamed.Note: If there were no tags, this method may be called immediately after
onStart(GitAnnotatedTagContext)without any calls toonTag(GitAnnotatedTag).- Parameters:
summary- summarizes the request and the streamed tags- Throws:
IOException- for implementations which perform I/O
-
onMissing
Called when one of the provided hashes was not found in the repository- Parameters:
objectHash- the object hash- Returns:
trueif more tags should be provided; otherwisefalseto end streaming, potentially leaving some number of tags unread- Throws:
IOException- for implementations which perform I/O
-
onOtherType
default boolean onOtherType(@Nonnull String objectHash, @Nonnull GitObjectType objectType) throws IOException Called when one of the provided hashes identifies an object that is not a tag object.- Parameters:
objectHash- the object hashobjectType- the actual type of the object. Possible values areGitObjectType.BLOB,GitObjectType.TREEorGitObjectType.COMMIT- Returns:
trueif more tags should be provided; otherwisefalseto end streaming, potentially leaving some number of tags unread- Throws:
IOException- for implementations which perform I/O
-
onStart
Called before the firsttagis streamed.- Parameters:
context- provides details about the request for which tags are being streamed- Throws:
IOException- for implementations which perform I/O
-
onTag
Receives a fully-populatedtagfor processing.This method will never be invoked before
onStart(GitAnnotatedTagContext), and if it is invokedonEnd(GitAnnotatedTagSummary)is guaranteed to be invoked, whether the end happens because this method returnsfalseor because the upstream sender runs out of tags.- Parameters:
tag- the tag- Returns:
trueif more tags should be provided; otherwisefalseto end streaming, potentially leaving some number of tags unread- Throws:
IOException- for implementations which perform I/O
-