blob: 9104f0490bed09d8cea853bb4c6b318544d7aed8 [file] [log] [blame]
Richard S. Hallc88fca32006-10-18 22:01:22 +00001/*
Richard S. Hallf28d6762009-06-08 19:31:06 +00002 * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
Richard S. Hallc88fca32006-10-18 22:01:22 +00003 *
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
17package org.osgi.framework;
18
19/**
Richard S. Hall53e70d32008-08-01 19:31:32 +000020 * A synchronous <code>BundleEvent</code> listener.
Richard S. Hallc88fca32006-10-18 22:01:22 +000021 * <code>SynchronousBundleListener</code> is a listener interface that may be
Richard S. Hall53e70d32008-08-01 19:31:32 +000022 * 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. Hallc88fca32006-10-18 22:01:22 +000028 * <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. Hall53e70d32008-08-01 19:31:32 +000042 * <code>AdminPermission[bundle,LISTENER]</code> is required to add or remove
43 * a <code>SynchronousBundleListener</code> object.
Richard S. Hallc88fca32006-10-18 22:01:22 +000044 *
Richard S. Hallc88fca32006-10-18 22:01:22 +000045 * @since 1.1
46 * @see BundleEvent
Richard S. Hall53e70d32008-08-01 19:31:32 +000047 * @ThreadSafe
Richard S. Hallf28d6762009-06-08 19:31:06 +000048 * @version $Revision: 5673 $
Richard S. Hallc88fca32006-10-18 22:01:22 +000049 */
50
51public interface SynchronousBundleListener extends BundleListener {
52 // This is a marker interface
53}