comparison src/org/tmatesoft/hg/core/HgChangesetHandler.java @ 312:f9f3e9b67ccc

Facilitate cancellation and progress reporting in changelog and manifest iterations
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 27 Sep 2011 05:29:12 +0200
parents 41a778e3fd31
children 9c9c442b5f2e
comparison
equal deleted inserted replaced
311:b9592e21176a 312:f9f3e9b67ccc
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.core; 17 package org.tmatesoft.hg.core;
18 18
19 import org.tmatesoft.hg.util.CancelledException;
20
19 /** 21 /**
20 * Callback to process {@link HgChangeset changesets}. 22 * Callback to process {@link HgChangeset changesets}.
21 * 23 *
22 * @author Artem Tikhomirov 24 * @author Artem Tikhomirov
23 * @author TMate Software Ltd. 25 * @author TMate Software Ltd.
24 */ 26 */
25 public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: <E extends Exception>*/ { 27 public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: <E extends Exception>*/ {
26 /** 28 /**
27 * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy. 29 * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy.
30 * @throws CancelledException if handler is not interested in more changesets and iteration shall stop
28 * @throws RuntimeException or any subclass thereof to indicate error. General contract is that RuntimeExceptions 31 * @throws RuntimeException or any subclass thereof to indicate error. General contract is that RuntimeExceptions
29 * will be re-thrown wrapped into {@link HgCallbackTargetException}. 32 * will be re-thrown wrapped into {@link HgCallbackTargetException}.
30 */ 33 */
31 void next(HgChangeset changeset)/* throws E*/; 34 void next(HgChangeset changeset) throws CancelledException;
32 } 35 }