接口 EventListenerHook
-
@ConsumerType public interface EventListenerHookOSGi Framework Service Event Listener Hook Service.Bundles registering this service will be called during framework service (register, modify, and unregister service) operations.
- 从以下版本开始:
- 1.1
- 作者:
- $Id: 2b80241ca24005be3a9a3550138e1ba9a3a9ad6e $
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidevent(ServiceEvent event, java.util.Map<BundleContext,java.util.Collection<ListenerHook.ListenerInfo>> listeners)Event listener hook method.
-
-
-
方法详细资料
-
event
void event(ServiceEvent event, java.util.Map<BundleContext,java.util.Collection<ListenerHook.ListenerInfo>> listeners)
Event listener hook method. This method is called prior to service event delivery when a publishing bundle registers, modifies or unregisters a service. This method can filter the listeners which receive the event.- 参数:
event- The service event to be delivered.listeners- A map of Bundle Contexts to a collection of Listener Infos for the bundle's listeners to which the specified event will be delivered. The implementation of this method may remove bundle contexts from the map and listener infos from the collection values to prevent the event from being delivered to the associated listeners. The map supports all the optionalMapoperations exceptputandputAll. Attempting to add to the map will result in anUnsupportedOperationException. The collection values in the map supports all the optionalCollectionoperations exceptaddandaddAll. Attempting to add to a collection will result in anUnsupportedOperationException. The map and the collections are not synchronized.
-
-