Package com.atlassian.bitbucket.commit
Class AbstractCommitCallback
java.lang.Object
com.atlassian.bitbucket.commit.AbstractCommitCallback
- All Implemented Interfaces:
CommitCallback
Convenience implementation of
CommitCallback
that provides no-op implementations for all methods.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Receives a fully-populatedcommit
for processing.void
onEnd
(CommitSummary summary) Called after the finalcommit
has been streamed.void
onStart
(CommitContext context) Called before the firstcommit
is streamed.
-
Constructor Details
-
AbstractCommitCallback
public AbstractCommitCallback()
-
-
Method Details
-
onCommit
Description copied from interface:CommitCallback
Receives a fully-populatedcommit
for processing.This method will never be invoked before
CommitCallback.onStart(CommitContext)
, and if it is invokedCommitCallback.onEnd(CommitSummary)
is guaranteed to be invoked, whether the end happens because this method returnsfalse
or because the upstream sender runs out of commits.- Specified by:
onCommit
in interfaceCommitCallback
- Parameters:
commit
- ignored- Returns:
true
- Throws:
IOException
- may be thrown by derived classes
-
onEnd
Description copied from interface:CommitCallback
Called after the finalcommit
has been streamed.Note: If there were no commits, this method may be called immediately after
CommitCallback.onStart(CommitContext)
without any calls toCommitCallback.onCommit(Commit)
.- Specified by:
onEnd
in interfaceCommitCallback
- Parameters:
summary
- ignored- Throws:
IOException
- may be thrown by derived classes
-
onStart
Description copied from interface:CommitCallback
Called before the firstcommit
is streamed.- Specified by:
onStart
in interfaceCommitCallback
- Parameters:
context
- ignored- Throws:
IOException
- may be thrown by derived classes
-