michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.sync.repositories.delegates; michael@0: michael@0: import java.util.concurrent.ExecutorService; michael@0: michael@0: import org.mozilla.gecko.sync.repositories.RepositorySession; michael@0: michael@0: /** michael@0: * One of these two methods is guaranteed to be called after session.begin() is michael@0: * invoked (possibly during the invocation). The callback will be invoked prior michael@0: * to any other RepositorySession callbacks. michael@0: * michael@0: * @author rnewman michael@0: * michael@0: */ michael@0: public interface RepositorySessionBeginDelegate { michael@0: public void onBeginFailed(Exception ex); michael@0: public void onBeginSucceeded(RepositorySession session); michael@0: public RepositorySessionBeginDelegate deferredBeginDelegate(ExecutorService executor); michael@0: }