1 /* 2 * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/BundleListener.java,v 1.13 2007/02/21 16:49:05 hargrave Exp $ 3 * 4 * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.osgi.framework; 20 21 import java.util.EventListener; 22 23 /** 24 * A <code>BundleEvent</code> listener. <code>BundleListener</code> is a 25 * listener interface that may be implemented by a bundle developer. When a 26 * <code>BundleEvent</code> is fired, it is asynchronously delivered to a 27 * <code>BundleListener</code>. The Framework delivers 28 * <code>BundleEvent</code> objects to a <code>BundleListener</code> in 29 * order and must not concurrently call a <code>BundleListener</code>. 30 * <p> 31 * A <code>BundleListener</code> object is registered with the Framework using 32 * the {@link BundleContext#addBundleListener} method. 33 * <code>BundleListener</code>s are called with a <code>BundleEvent</code> 34 * object when a bundle has been installed, resolved, started, stopped, updated, 35 * unresolved, or uninstalled. 36 * 37 * @see BundleEvent 38 * @NotThreadSafe 39 * @version $Revision: 1.13 $ 40 */ 41 42 public interface BundleListener extends EventListener { 43 /** 44 * Receives notification that a bundle has had a lifecycle change. 45 * 46 * @param event The <code>BundleEvent</code>. 47 */ 48 public void bundleChanged(BundleEvent event); 49 } 50