public abstract class

AbstractCommitCallback

extends Object
implements CommitCallback
java.lang.Object
   ↳ com.atlassian.bitbucket.commit.AbstractCommitCallback

Class Overview

Convenience implementation of CommitCallback that provides no-op implementations for all methods.

Summary

Public Constructors
AbstractCommitCallback()
Public Methods
boolean onCommit(Commit commit)
Receives a fully-populated commit for processing.
void onEnd(CommitSummary summary)
Called after the final commit has been streamed.
void onStart(CommitContext context)
Called before the first commit is streamed.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.bitbucket.commit.CommitCallback

Public Constructors

public AbstractCommitCallback ()

Public Methods

public boolean onCommit (Commit commit)

Receives a fully-populated commit for processing.

This method will never be invoked before onStart(CommitContext), and if it is invoked onEnd(CommitSummary) is guaranteed to be invoked, whether the end happens because this method returns false or because the upstream sender runs out of commits.

Parameters
commit ignored
Returns
  • true
Throws
IOException may be thrown by derived classes

public void onEnd (CommitSummary summary)

Called after the final commit has been streamed.

Note: If there were no commits, this method may be called immediately after onStart(CommitContext) without any calls to onCommit(Commit).

Parameters
summary ignored
Throws
IOException may be thrown by derived classes

public void onStart (CommitContext context)

Called before the first commit is streamed.

Parameters
context ignored
Throws
IOException may be thrown by derived classes