Interface TagCallback


public interface TagCallback
A callback for streaming tags.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onEnd(TagSummary summary)
    Called after the final tag has been streamed.
    default void
    Called before the first tag is streamed.
    default boolean
    onTag(Tag tag)
    Called to process a tag.
  • Method Details

    • onEnd

      default void onEnd(@Nonnull TagSummary summary) throws IOException
      Called after the final tag has been streamed.

      Note: If there were no tags, this method may be called immediately after onStart(TagContext) without any calls to onTag(Tag).

      Parameters:
      summary - summarizes the request and the streamed tags
      Throws:
      IOException - may be thrown by implementations which perform I/O
    • onStart

      default void onStart(@Nonnull TagContext context) throws IOException
      Called before the first tag is streamed.
      Parameters:
      context - provides details about the request for which tags are being streamed
      Throws:
      IOException - may be thrown by implementations which perform I/O
    • onTag

      default boolean onTag(@Nonnull Tag tag) throws IOException
      Called to process a tag.
      Parameters:
      tag - the tag to be handled by the callback
      Returns:
      true if further tags should be streamed; otherwise, false to stop streaming
      Throws:
      IOException - may be thrown by implementations which perform I/O