Package com.atlassian.bitbucket.scm.bulk
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.
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 Summary
Modifier and TypeMethodDescriptiondefault BulkContentDisposition
For each added, modified or deleted file, this method is called once with the metadata.default void
onEnd
(BulkContentSummary summary) Called at the end.void
onFile
(BulkFile file, InputStream content) For each file where the content was requested withaccept(com.atlassian.bitbucket.scm.bulk.BulkFile)
, this method is called.default void
onStart
(BulkContentContext context) Called before any other methods are called.
-
Method Details
-
accept
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 toonFile(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
Called at the end.- Parameters:
summary
- provides details about the command execution
-
onFile
For each file where the content was requested withaccept(com.atlassian.bitbucket.scm.bulk.BulkFile)
, this method is called.- Parameters:
file
- information about the filecontent
- the input stream of the contents; must be consumed before method returns (it won't stay usable after)
-
onStart
Called before any other methods are called.- Parameters:
context
- provides details about the request
-