OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

org.osgi.framework.hooks.service
Interface EventHook


Deprecated. As of 1.1. Replaced by EventListenerHook.

public interface EventHook

OSGi Framework Service Event Hook Service.

Bundles registering this service will be called during framework service (register, modify, and unregister service) operations.

ThreadSafe

Method Summary
 void event(ServiceEvent event, java.util.Collection<BundleContext> contexts)
          Deprecated. Event hook method.
 

Method Detail

event

void event(ServiceEvent event,
           java.util.Collection<BundleContext> contexts)
Deprecated. 
Event 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 bundles which receive the event.

Parameters:
event - The service event to be delivered.
contexts - A collection of Bundle Contexts for bundles which have listeners to which the specified event will be delivered. The implementation of this method may remove bundle contexts from the collection to prevent the event from being delivered to the associated bundles. The collection supports all the optional Collection operations except add and addAll. Attempting to add to the collection will result in an UnsupportedOperationException. The collection is not synchronized.

OSGi™ Service Platform
Core Specification

Release 4 Version 4.3

Copyright © OSGi Alliance (2000, 2012). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0