Interface BulkContentCallback

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BulkContentCallback
Callback for streamed file content.

Note that there is no guarantee about the order in which the files are handed to the callback.

Since:
4.2
  • Method Details

    • accept

      @Nonnull default BulkContentDisposition accept(@Nonnull BulkFile file)
      For each added, modified or deleted file, this method is called once with the metadata. This allows the callback to request content if it's interested in it or stop processing. If the callback signals that it wants the file's content, it will be provided to onFile(com.atlassian.bitbucket.scm.bulk.BulkFile, java.io.InputStream).
      Parameters:
      file - information about the file
      Returns:
      an instruction to the caller about how to proceed
    • onEnd

      default void onEnd(@Nonnull BulkContentSummary summary)
      Called at the end.
      Parameters:
      summary - provides details about the command execution
    • onFile

      void onFile(@Nonnull BulkFile file, @Nonnull InputStream content)
      For each file where the content was requested with accept(com.atlassian.bitbucket.scm.bulk.BulkFile), this method is called.
      Parameters:
      file - information about the file
      content - the input stream of the contents; must be consumed before method returns (it won't stay usable after)
    • onStart

      default void onStart(@Nonnull BulkContentContext context)
      Called before any other methods are called.
      Parameters:
      context - provides details about the request