org.eclipse.gemini.blueprint.config.internal.adapter
Class OsgiServiceRegistrationListenerAdapter

java.lang.Object
  extended by org.eclipse.gemini.blueprint.config.internal.adapter.OsgiServiceRegistrationListenerAdapter
All Implemented Interfaces:
OsgiServiceRegistrationListener, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean

public class OsgiServiceRegistrationListenerAdapter
extends Object
implements OsgiServiceRegistrationListener, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware

Adapter/wrapper class that handles listener with custom method invocation. Similar in functionality to OsgiServiceLifecycleListenerAdapter.

Author:
Costin Leau

Constructor Summary
OsgiServiceRegistrationListenerAdapter()
           
 
Method Summary
 void afterPropertiesSet()
           
 void registered(Object service, Map serviceProperties)
          Called when the the service exported has been registered in the OSGi space.
 void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
           
 void setBlueprintCompliant(boolean compliant)
           
 void setRegistrationMethod(String registrationMethod)
           
 void setTarget(Object target)
           
 void setTargetBeanName(String targetBeanName)
           
 void setUnregistrationMethod(String unregistrationMethod)
           
 void unregistered(Object service, Map serviceProperties)
          Called when the OSGi service has been unregistered (removed from OSGi space).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiServiceRegistrationListenerAdapter

public OsgiServiceRegistrationListenerAdapter()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

registered

public void registered(Object service,
                       Map serviceProperties)
Description copied from interface: OsgiServiceRegistrationListener
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.

Specified by:
registered in interface OsgiServiceRegistrationListener
Parameters:
service - object registered as an OSGi service
serviceProperties - OSGi service registration properties

unregistered

public void unregistered(Object service,
                         Map serviceProperties)
Description copied from interface: OsgiServiceRegistrationListener
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.

Specified by:
unregistered in interface OsgiServiceRegistrationListener
Parameters:
service - object unregistered as a service from the OSGi space
serviceProperties - OSGi service registration properties

setRegistrationMethod

public void setRegistrationMethod(String registrationMethod)
Parameters:
registrationMethod - The registrationMethod to set.

setUnregistrationMethod

public void setUnregistrationMethod(String unregistrationMethod)
Parameters:
unregistrationMethod - The unregistrationMethod to set.

setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Specified by:
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware

setTarget

public void setTarget(Object target)
Parameters:
target - The target to set.

setTargetBeanName

public void setTargetBeanName(String targetBeanName)
Parameters:
targetBeanName - The targetBeanName to set.

setBlueprintCompliant

public void setBlueprintCompliant(boolean compliant)


Copyright © 2006-2012. All Rights Reserved.