public interface

ChangesetCallback

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

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.
@Deprecated void onEnd()
This method is deprecated. in 2.10 for removal in 3.0. Callbacks should extend AbstractChangesetCallback and implement onEnd(ChangesetSummary) instead
@Deprecated void onStart()
This method is deprecated. in 2.10 for removal in 3.0. Callbacks should extend AbstractChangesetCallback and implement onStart(ChangesetContext) instead.

Public Methods

public boolean onChangeset (Changeset changeset)

Receives a fully populated Changeset for processing.

This method will never be invoked before onStart(), and if it is invoked onEnd() 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.

@Deprecated public void onEnd ()

This method is deprecated.
in 2.10 for removal in 3.0. Callbacks should extend AbstractChangesetCallback and implement onEnd(ChangesetSummary) instead

Called to indicate there are no more Changesets to process. This may be triggered artificially by returning false from onChangeset(Changeset).

If onStart() and onChangeset(Changeset) are not invoked, this method will not be either.

Throws
IOException May be thrown by implementations which write changesets to some form of output stream.

@Deprecated public void onStart ()

This method is deprecated.
in 2.10 for removal in 3.0. Callbacks should extend AbstractChangesetCallback and implement onStart(ChangesetContext) instead.

Called to indicate the first changeset has been found, before the first call to onChangeset(Changeset).

If there are no changesets available (meaning onChangeset(Changeset) will never be called), this method will never be invoked on the callback.

Throws
IOException May be thrown by implementations which write changesets to some form of output stream.