Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 1 | /* |
Richard S. Hall | f28d676 | 2009-06-08 19:31:06 +0000 | [diff] [blame] | 2 | * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved. |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.osgi.framework; |
| 18 | |
| 19 | /** |
Richard S. Hall | 53e70d3 | 2008-08-01 19:31:32 +0000 | [diff] [blame] | 20 | * A synchronous <code>BundleEvent</code> listener. |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 21 | * <code>SynchronousBundleListener</code> is a listener interface that may be |
Richard S. Hall | 53e70d3 | 2008-08-01 19:31:32 +0000 | [diff] [blame] | 22 | * implemented by a bundle developer. When a <code>BundleEvent</code> is |
| 23 | * fired, it is synchronously delivered to a |
| 24 | * <code>SynchronousBundleListener</code>. The Framework may deliver |
| 25 | * <code>BundleEvent</code> objects to a |
| 26 | * <code>SynchronousBundleListener</code> out of order and may concurrently |
| 27 | * call and/or reenter a <code>SynchronousBundleListener</code>. |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 28 | * <p> |
| 29 | * A <code>SynchronousBundleListener</code> object is registered with the |
| 30 | * Framework using the {@link BundleContext#addBundleListener} method. |
| 31 | * <code>SynchronousBundleListener</code> objects are called with a |
| 32 | * <code>BundleEvent</code> object when a bundle has been installed, resolved, |
| 33 | * starting, started, stopping, stopped, updated, unresolved, or uninstalled. |
| 34 | * <p> |
| 35 | * Unlike normal <code>BundleListener</code> objects, |
| 36 | * <code>SynchronousBundleListener</code>s are synchronously called during |
| 37 | * bundle lifecycle processing. The bundle lifecycle processing will not proceed |
| 38 | * until all <code>SynchronousBundleListener</code>s have completed. |
| 39 | * <code>SynchronousBundleListener</code> objects will be called prior to |
| 40 | * <code>BundleListener</code> objects. |
| 41 | * <p> |
Richard S. Hall | 53e70d3 | 2008-08-01 19:31:32 +0000 | [diff] [blame] | 42 | * <code>AdminPermission[bundle,LISTENER]</code> is required to add or remove |
| 43 | * a <code>SynchronousBundleListener</code> object. |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 44 | * |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 45 | * @since 1.1 |
| 46 | * @see BundleEvent |
Richard S. Hall | 53e70d3 | 2008-08-01 19:31:32 +0000 | [diff] [blame] | 47 | * @ThreadSafe |
Richard S. Hall | f28d676 | 2009-06-08 19:31:06 +0000 | [diff] [blame] | 48 | * @version $Revision: 5673 $ |
Richard S. Hall | c88fca3 | 2006-10-18 22:01:22 +0000 | [diff] [blame] | 49 | */ |
| 50 | |
| 51 | public interface SynchronousBundleListener extends BundleListener { |
| 52 | // This is a marker interface |
| 53 | } |