Class AbstractRefCallback

java.lang.Object
com.atlassian.bitbucket.repository.AbstractRefCallback
All Implemented Interfaces:
RefCallback

public class AbstractRefCallback extends Object implements RefCallback
Convenience implementation of RefCallback that provides no-op implementations for all methods.
  • Constructor Details

    • AbstractRefCallback

      public AbstractRefCallback()
  • Method Details

    • onEnd

      public void onEnd(@Nonnull RefSummary summary) throws IOException
      Description copied from interface: RefCallback
      Called after the final ref has been streamed.

      Note: If there were no refs, this method may be called immediately after RefCallback.onStart(RefContext) without any calls to RefCallback.onRef(Ref).

      Specified by:
      onEnd in interface RefCallback
      Parameters:
      summary - summarizes the request and the streamed refs
      Throws:
      IOException - may be thrown by implementations which perform I/O.
    • onRef

      public boolean onRef(@Nonnull Ref ref) throws IOException
      Discards the provided ref.
      Specified by:
      onRef in interface RefCallback
      Parameters:
      ref - ignored
      Returns:
      true if further refs should be streamed; otherwise, false to stop streaming
      Throws:
      IOException - may be thrown by implementations which perform I/O.
    • onStart

      public void onStart(@Nonnull RefContext context) throws IOException
      Description copied from interface: RefCallback
      Called before the first ref is streamed.
      Specified by:
      onStart in interface RefCallback
      Parameters:
      context - provides details about the request for which refs are being streamed
      Throws:
      IOException - may be thrown by implementations which perform I/O.