Mercurial > projects > dwt2
comparison org.eclipse.osgi/osgi/src/org/osgi/framework/ServiceListener.d @ 105:bbe49769ec18
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 08 Nov 2009 12:42:30 +0100 |
parents | 12b890a6392a |
children |
comparison
equal
deleted
inserted
replaced
104:88652073d1c2 | 105:bbe49769ec18 |
---|---|
1 /* | 1 /* |
2 * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceListener.java,v 1.15 2007/02/20 00:16:30 hargrave Exp $ | 2 * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/ServiceListener.java,v 1.15 2007/02/20 00:16:30 hargrave Exp $ |
3 * | 3 * |
4 * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved. | 4 * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved. |
5 * | 5 * |
6 * Licensed under the Apache License, Version 2.0 (the "License"); | 6 * Licensed under the Apache License, Version 2.0 (the "License"); |
7 * you may not use this file except in compliance with 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 | 8 * You may obtain a copy of the License at |
9 * | 9 * |
10 * http://www.apache.org/licenses/LICENSE-2.0 | 10 * http://www.apache.org/licenses/LICENSE-2.0 |
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 * See the License for the specific language governing permissions and | 15 * See the License for the specific language governing permissions and |
16 * limitations under the License. | 16 * limitations under the License. |
17 */ | 17 */ |
18 | 18 |
19 // Port to the D programming language: | |
20 // Frank Benoit <benoit@tionex.de> | |
19 module org.osgi.framework.ServiceListener; | 21 module org.osgi.framework.ServiceListener; |
20 import org.osgi.framework.ServiceEvent; | |
21 | 22 |
22 import java.lang.all; | 23 import java.lang.all; |
24 | |
25 import org.osgi.framework.ServiceEvent; // packageimport | |
26 | |
23 import java.util.EventListener; | 27 import java.util.EventListener; |
24 | 28 |
25 /** | 29 /** |
26 * A <code>ServiceEvent</code> listener. <code>ServiceListener</code> is a | 30 * A <code>ServiceEvent</code> listener. <code>ServiceListener</code> is a |
27 * listener interface that may be implemented by a bundle developer. When a | 31 * listener interface that may be implemented by a bundle developer. When a |
28 * <code>ServiceEvent</code> is fired, it is synchronously delivered to a | 32 * <code>ServiceEvent</code> is fired, it is synchronously delivered to a |
29 * <code>ServiceListener</code>. The Framework may deliver | 33 * <code>ServiceListener</code>. The Framework may deliver |
30 * <code>ServiceEvent</code> objects to a <code>ServiceListener</code> out | 34 * <code>ServiceEvent</code> objects to a <code>ServiceListener</code> out |
31 * of order and may concurrently call and/or reenter a | 35 * of order and may concurrently call and/or reenter a |
32 * <code>ServiceListener</code>. | 36 * <code>ServiceListener</code>. |
33 * | 37 * |
34 * <p> | 38 * <p> |
35 * A <code>ServiceListener</code> object is registered with the Framework | 39 * A <code>ServiceListener</code> object is registered with the Framework |
36 * using the <code>BundleContext.addServiceListener</code> method. | 40 * using the <code>BundleContext.addServiceListener</code> method. |
37 * <code>ServiceListener</code> objects are called with a | 41 * <code>ServiceListener</code> objects are called with a |
38 * <code>ServiceEvent</code> object when a service is registered, modified, or | 42 * <code>ServiceEvent</code> object when a service is registered, modified, or |
39 * is in the process of unregistering. | 43 * is in the process of unregistering. |
40 * | 44 * |
41 * <p> | 45 * <p> |
42 * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code> | 46 * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code> |
43 * objects is filtered by the filter specified when the listener was registered. | 47 * objects is filtered by the filter specified when the listener was registered. |
44 * If the Java Runtime Environment supports permissions, then additional | 48 * If the Java Runtime Environment supports permissions, then additional |
45 * filtering is done. <code>ServiceEvent</code> objects are only delivered to | 49 * filtering is done. <code>ServiceEvent</code> objects are only delivered to |
46 * the listener if the bundle which defines the listener object's class has the | 50 * the listener if the bundle which defines the listener object's class has the |
47 * appropriate <code>ServicePermission</code> to get the service using at | 51 * appropriate <code>ServicePermission</code> to get the service using at |
48 * least one of the named classes under which the service was registered. | 52 * least one of the named classes under which the service was registered. |
49 * | 53 * |
50 * <p> | 54 * <p> |
51 * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code> | 55 * <code>ServiceEvent</code> object delivery to <code>ServiceListener</code> |
52 * objects is further filtered according to package sources as defined in | 56 * objects is further filtered according to package sources as defined in |
53 * {@link ServiceReference#isAssignableTo(Bundle, String)}. | 57 * {@link ServiceReference#isAssignableTo(Bundle, String)}. |
54 * | 58 * |
55 * @see ServiceEvent | 59 * @see ServiceEvent |
56 * @see ServicePermission | 60 * @see ServicePermission |
57 * @ThreadSafe | 61 * @ThreadSafe |
58 * @version $Revision: 1.15 $ | 62 * @version $Revision: 1.15 $ |
59 */ | 63 */ |
60 | 64 |
61 public interface ServiceListener : EventListener { | 65 public interface ServiceListener : EventListener { |
62 /** | 66 /** |
63 * Receives notification that a service has had a lifecycle change. | 67 * Receives notification that a service has had a lifecycle change. |
64 * | 68 * |
65 * @param event The <code>ServiceEvent</code> object. | 69 * @param event The <code>ServiceEvent</code> object. |
66 */ | 70 */ |
67 public void serviceChanged(ServiceEvent event); | 71 public void serviceChanged(ServiceEvent event); |
68 } | 72 } |