@Deprecated public interface

ChangesetCallback

com.atlassian.stash.content.ChangesetCallback
Known Indirect Subclasses

This interface is deprecated.
in 3.7 for removal in 4.0. All things "changeset" are being renamed to "commit", the more common term for the data they represent. Callbacks should implement CommitCallback instead.

Class Overview

Callback that can be provided to a ScmClient to stream collections of Changesets from the scm.

Note: Implementors are strongly encouraged to extend from AbstractChangesetCallback. This interface will change, over time, and any class implementing it directly will be broken by such changes. Extending from the abstract class will help prevent such breakages.

Summary

Public Methods
boolean onChangeset(Changeset changeset)
Receives a fully populated Changeset for processing.
void onEnd(ChangesetSummary summary)
Called after the final changeset has been streamed.
void onStart(ChangesetContext context)
Called before the first changeset is streamed.

Public Methods

public boolean onChangeset (Changeset changeset)

Receives a fully populated Changeset for processing.

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

Parameters
changeset the changeset
Returns
  • true if more changesets should be provided; otherwise false to end streaming, potentially leaving some number of changesets unread
Throws
IOException May by thrown by implementations which write changesets to some form of output stream.

public void onEnd (ChangesetSummary summary)

Called after the final changeset has been streamed.

Note: If there were no changes, this method may be called immediately after onStart(ChangesetContext) without any calls to onChangeset(Changeset).

Parameters
summary summarizes the request and the streamed changesets
Throws
IOException May be thrown by implementations which perform I/O.

public void onStart (ChangesetContext context)

Called before the first changeset is streamed.

Parameters
context provides details about the request for which changesets are being streamed
Throws
IOException May be thrown by implementations which perform I/O.