org.springframework.osgi.service
Interface TargetSourceLifecycleListener

All Known Implementing Classes:
WeatherListener

public interface TargetSourceLifecycleListener

Listener tracking binding and unbinding of OSGi services used as normal object references inside Spring OSGi.

Author:
Costin Leau

Method Summary
 void bind(Object service, Map properties)
          Called when a service is being binded inside the proxy (be it single or multi value).
 void unbind(Object service, Map properties)
          Called when a service is being unbinded inside the proxy (be it single or multi value).
 

Method Detail

bind

void bind(Object service,
          Map properties)
          throws Exception
Called when a service is being binded inside the proxy (be it single or multi value). The service properties are made available as a Map which can be safely cast to a Dictionary if needed.

Parameters:
service - the OSGi service instance
properties - the service properties
Throws:
Exception - exceptions are logged but not propagated to other listeners

unbind

void unbind(Object service,
            Map properties)
            throws Exception
Called when a service is being unbinded inside the proxy (be it single or multi value). The service properties are made available as a Map which can be safely cast to a Dictionary if needed.

Parameters:
service - the OSGi service instance
properties - the service properties
Throws:
Exception - exceptions are logged but not propagated to other listeners


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