tikhomirov@205: /* tikhomirov@205: * Copyright (c) 2011 TMate Software Ltd tikhomirov@205: * tikhomirov@205: * This program is free software; you can redistribute it and/or modify tikhomirov@205: * it under the terms of the GNU General Public License as published by tikhomirov@205: * the Free Software Foundation; version 2 of the License. tikhomirov@205: * tikhomirov@205: * This program is distributed in the hope that it will be useful, tikhomirov@205: * but WITHOUT ANY WARRANTY; without even the implied warranty of tikhomirov@205: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the tikhomirov@205: * GNU General Public License for more details. tikhomirov@205: * tikhomirov@205: * For information on how to redistribute this software under tikhomirov@205: * the terms of a license other than GNU General Public License tikhomirov@205: * contact TMate Software at support@hg4j.com tikhomirov@205: */ tikhomirov@205: package org.tmatesoft.hg.core; tikhomirov@205: tikhomirov@312: import org.tmatesoft.hg.util.CancelledException; tikhomirov@312: tikhomirov@205: /** tikhomirov@205: * Callback to process {@link HgChangeset changesets}. tikhomirov@205: * tikhomirov@205: * @author Artem Tikhomirov tikhomirov@205: * @author TMate Software Ltd. tikhomirov@205: */ tikhomirov@215: public interface HgChangesetHandler/*XXX perhaps, shall parameterize with exception clients can throw, like: */ { tikhomirov@205: /** tikhomirov@205: * @param changeset not necessarily a distinct instance each time, {@link HgChangeset#clone() clone()} if need a copy. tikhomirov@312: * @throws CancelledException if handler is not interested in more changesets and iteration shall stop tikhomirov@215: * @throws RuntimeException or any subclass thereof to indicate error. General contract is that RuntimeExceptions tikhomirov@215: * will be re-thrown wrapped into {@link HgCallbackTargetException}. tikhomirov@205: */ tikhomirov@312: void next(HgChangeset changeset) throws CancelledException; tikhomirov@205: }