tikhomirov@205: /* tikhomirov@423: * Copyright (c) 2011-2012 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@423: import org.tmatesoft.hg.internal.Callback; 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@423: @Callback 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@423: * @throws HgCallbackTargetException wrapper for any exception user code may produce tikhomirov@312: * @throws CancelledException if handler is not interested in more changesets and iteration shall stop tikhomirov@205: */ tikhomirov@423: void next(HgChangeset changeset) throws HgCallbackTargetException, CancelledException; tikhomirov@205: }