Knopflerfish OSGi 5.2.0

org.osgi.framework.hooks.service
Interface ListenerHook


public interface ListenerHook

OSGi Framework Service Listener Hook Service.

Bundles registering this service will be called during service listener addition and removal.

Version:
$Id: 94029e2b70119793b3e7d77d6e1d5052d9ee1723 $
ThreadSafe

Nested Class Summary
static interface ListenerHook.ListenerInfo
          Information about a Service Listener.
 
Method Summary
 void added(java.util.Collection<ListenerHook.ListenerInfo> listeners)
          Added listeners hook method.
 void removed(java.util.Collection<ListenerHook.ListenerInfo> listeners)
          Removed listeners hook method.
 

Method Detail

added

void added(java.util.Collection<ListenerHook.ListenerInfo> listeners)
Added listeners hook method. This method is called to provide the hook implementation with information on newly added service listeners. This method will be called as service listeners are added while this hook is registered. Also, immediately after registration of this hook, this method will be called to provide the current collection of service listeners which had been added prior to the hook being registered.

Parameters:
listeners - A collection of ListenerHook.ListenerInfos for newly added service listeners which are now listening to service events. Attempting to add to or remove from the collection will result in an UnsupportedOperationException. The collection is not synchronized.

removed

void removed(java.util.Collection<ListenerHook.ListenerInfo> listeners)
Removed listeners hook method. This method is called to provide the hook implementation with information on newly removed service listeners. This method will be called as service listeners are removed while this hook is registered.

Parameters:
listeners - A collection of ListenerHook.ListenerInfos for newly removed service listeners which are no longer listening to service events. Attempting to add to or remove from the collection will result in an UnsupportedOperationException. The collection is not synchronized.

Knopflerfish OSGi 5.2.0