Interface AnnotationCallback
public interface AnnotationCallback
A callback to be used when streaming
annotations
.- Since:
- 5.15
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
onAnnotation
(InsightAnnotation annotation) Called once for every annotation produced by search criteria provided to the streaming API.default void
onEnd
(boolean truncated) Called just after the system finishes streamingannotations
.default void
onStart
(int totalAnnotationCount) Called just before the system starts streamingannotations
-
Method Details
-
onAnnotation
Called once for every annotation produced by search criteria provided to the streaming API.- Parameters:
annotation
- an annotation matching the search criteria- Returns:
true
if more annotations should be streamed.false
to stop the streaming
-
onEnd
default void onEnd(boolean truncated) Called just after the system finishes streamingannotations
.- Parameters:
truncated
- If annotations were requested in the context of a pull request, then this property indicates that the pull request diff was too large to process and has been truncated. This can mean that some annotations were not provided to the annotation callback that theoretically should have been.
-
onStart
default void onStart(int totalAnnotationCount) Called just before the system starts streamingannotations
- Parameters:
totalAnnotationCount
- number of annotations recorded for a commit. For pull requests this may be a number larger than the annotations streamed. For a commit they will always be the same
-