1 /******************************************************************************* 2 * Copyright (c) 2000, 2005 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 * 11 *******************************************************************************/ 12 package org.eclipse.update.operations; 13 14 /** 15 * Listener for the operation lifecycle. This allows listeners to execute certain code before an operation 16 * starts, or after it completes. 17 * <p> 18 * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to 19 * change significantly before reaching stability. It is being made available at this early stage to solicit feedback 20 * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken 21 * (repeatedly) as the API evolves. 22 * </p> 23 * @since 3.0 24 */ 25 public interface IOperationListener { 26 /** 27 * May be called before an operation starts executing. 28 * @param operation operation to listen to 29 * @param data info specific to the operation 30 * @return not used 31 */ 32 public boolean beforeExecute(IOperation operation, Object data); 33 /** 34 * May be called after an operation finishes executing. 35 * @param operation operation to listen to 36 * @param data info specific to the operation 37 * @return not used 38 */ 39 public boolean afterExecute(IOperation operation, Object data); 40 } 41