OSGi™ Service Platform
Release 4 Version 4.2

org.osgi.application
Interface ApplicationServiceListener

All Superinterfaces:
java.util.EventListener

public interface ApplicationServiceListener
extends java.util.EventListener

An ApplicationServiceEvent listener. When a ServiceEvent is fired, it is converted to an ApplictionServiceEvent and it is synchronously delivered to an ApplicationServiceListener.

ApplicationServiceListener is a listener interface that may be implemented by an application developer.

An ApplicationServiceListener object is registered with the Framework using the ApplicationContext.addServiceListener method. ApplicationServiceListener objects are called with an ApplicationServiceEvent object when a service is registered, modified, or is in the process of unregistering.

ApplicationServiceEvent object delivery to ApplicationServiceListener objects is filtered by the filter specified when the listener was registered. If the Java Runtime Environment supports permissions, then additional filtering is done. ApplicationServiceEvent objects are only delivered to the listener if the application which defines the listener object's class has the appropriate ServicePermission to get the service using at least one of the named classes the service was registered under, and the application specified its dependence on the corresponding service in the application metadata.

ApplicationServiceEvent object delivery to ApplicationServiceListener objects is further filtered according to package sources as defined in ServiceReference.isAssignableTo(Bundle, String).

See Also:
ApplicationServiceEvent, ServicePermission

Method Summary
 void serviceChanged(ApplicationServiceEvent event)
          Receives notification that a service has had a lifecycle change.
 

Method Detail

serviceChanged

void serviceChanged(ApplicationServiceEvent event)
Receives notification that a service has had a lifecycle change.

Parameters:
event - The ApplicationServiceEvent object.

OSGi™ Service Platform
Release 4 Version 4.2

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