Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/AllServiceListener.java,v 1.5 2005/05/13 20:32:55 hargrave Exp $ |
| 3 | * |
| 4 | * Copyright (c) OSGi Alliance (2005). All Rights Reserved. |
| 5 | * |
| 6 | * This program and the accompanying materials are made available under the |
| 7 | * terms of the Eclipse Public License v1.0 which accompanies this |
| 8 | * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. |
| 9 | */ |
| 10 | |
| 11 | package org.osgi.framework; |
| 12 | |
| 13 | /** |
| 14 | * A <code>ServiceEvent</code> listener. |
| 15 | * |
| 16 | * <p><code>AllServiceListener</code> is a listener interface that may be implemented by a bundle |
| 17 | * developer. |
| 18 | * <p>An <code>AllServiceListener</code> object is registered with the Framework using the |
| 19 | * <code>BundleContext.addServiceListener</code> method. |
| 20 | * <code>AllServiceListener</code> objects are called with a <code>ServiceEvent</code> object when |
| 21 | * a service is registered, modified, or is in the process of unregistering. |
| 22 | * |
| 23 | * <p><code>ServiceEvent</code> object delivery to <code>AllServiceListener</code> objects is filtered by the |
| 24 | * filter specified when the listener was registered. If the Java Runtime Environment |
| 25 | * supports permissions, then additional filtering is done. |
| 26 | * <code>ServiceEvent</code> objects are only delivered to the listener if the bundle which defines |
| 27 | * the listener object's class has the appropriate <code>ServicePermission</code> to get the service |
| 28 | * using at least one of the named classes the service was registered under. |
| 29 | * |
| 30 | * <p> |
| 31 | * Unlike normal <code>ServiceListener</code> objects, |
| 32 | * <code>AllServiceListener</code> objects receive all ServiceEvent objects regardless of the |
| 33 | * whether the package source of the listening bundle is equal to the package source of |
| 34 | * the bundle that registered the service. This means that the listener may not be able to |
| 35 | * cast the service object to any of its corresponding service interfaces if the service |
| 36 | * object is retrieved. |
| 37 | * |
| 38 | * @version $Revision: 1.5 $ |
| 39 | * @see ServiceEvent |
| 40 | * @see ServicePermission |
| 41 | */ |
| 42 | |
| 43 | public abstract interface AllServiceListener extends ServiceListener |
| 44 | { |
| 45 | //This is a marker interface |
| 46 | } |
| 47 | |
| 48 | |