org.springframework.osgi.service.exporter
Interface OsgiServiceRegistrationListener


public interface OsgiServiceRegistrationListener

Registration listener that needs notifications of registration and unregistration of OSGi services exported through Spring OSGi. Implementations can throws exceptions if they need/have to but they are not be propagated to other listeners nor do they stop the other listeners from being notified.

Author:
Costin Leau
See Also:
OsgiServiceFactoryBean

Method Summary
 void registered(Object service, Map serviceProperties)
          Called when the the service exported has been registered in the OSGi space.
 void unregistered(Object service, Map serviceProperties)
          Called when the OSGi service has been unregistered (removed from OSGi space).
 

Method Detail

registered

void registered(Object service,
                Map serviceProperties)
                throws Exception
Called when the the service exported has been registered in the OSGi space. The service properties are made available as a Map which can be safely cast to a Dictionary if needed.

Parameters:
service - object registered as an OSGi service
serviceProperties - OSGi service registration properties
Throws:
Exception - custom exception that is logged but not propagated to other listeners

unregistered

void unregistered(Object service,
                  Map serviceProperties)
                  throws Exception
Called when the OSGi service has been unregistered (removed from OSGi space). The service properties are made available as a Map which can be safely cast to a Dictionary if needed.

Parameters:
service - object unregistered as a service from the OSGi space
serviceProperties - OSGi service registration properties
Throws:
Exception - custom exception that is logged but not propagated to other listeners


Copyright © 2006-2009 Spring Framework. All Rights Reserved.