public interface

AnnotationCallback

com.atlassian.bitbucket.codeinsights.annotation.AnnotationCallback

Class Overview

A callback to be used when streaming annotations.

Summary

Public Methods
boolean onAnnotation(InsightAnnotation annotation)
Called once for every annotation produced by search criteria provided to the streaming API.
void onEnd(boolean truncated)
Called just after the system finishes streaming annotations.
void onStart(int totalAnnotationCount)
Called just before the system starts streaming annotations

Public Methods

public boolean onAnnotation (InsightAnnotation annotation)

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

public void onEnd (boolean truncated)

Called just after the system finishes streaming annotations.

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.

public void onStart (int totalAnnotationCount)

Called just before the system starts streaming annotations

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