public class OsgiServiceRegistrationListenerAdapter extends java.lang.Object implements OsgiServiceRegistrationListener, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware
OsgiServiceLifecycleListenerAdapter.| Modifier and Type | Field and Description |
|---|---|
private org.springframework.beans.factory.BeanFactory |
beanFactory
bean factory used for retrieving the target when dealing with cycles
|
private boolean |
initialized
init flag
|
private boolean |
isBlueprintCompliant |
private boolean |
isListener
does the target implement the listener interface
|
private static org.apache.commons.logging.Log |
log |
private java.lang.String |
registrationMethod |
private java.util.Map<java.lang.Class<?>,java.util.List<java.lang.reflect.Method>> |
registrationMethods
Map of methods keyed by the first parameter which indicates the service type expected.
|
private java.lang.Object |
target
actual target
|
private java.lang.String |
targetBeanName
target bean name (when dealing with cycles)
|
private java.lang.String |
unregistrationMethod |
private java.util.Map<java.lang.Class<?>,java.util.List<java.lang.reflect.Method>> |
unregistrationMethods
Map of methods keyed by the first parameter which indicates the service type expected.
|
| Constructor and Description |
|---|
OsgiServiceRegistrationListenerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
private void |
initialize()
Initialise adapter.
|
void |
registered(java.lang.Object service,
java.util.Map serviceProperties)
Called when the the service exported has been registered in the OSGi space.
|
private void |
retrieveTarget() |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setBlueprintCompliant(boolean compliant) |
void |
setRegistrationMethod(java.lang.String registrationMethod) |
void |
setTarget(java.lang.Object target) |
void |
setTargetBeanName(java.lang.String targetBeanName) |
void |
setUnregistrationMethod(java.lang.String unregistrationMethod) |
void |
unregistered(java.lang.Object service,
java.util.Map serviceProperties)
Called when the OSGi service has been unregistered (removed from OSGi space).
|
private static final org.apache.commons.logging.Log log
private boolean isListener
private java.lang.String registrationMethod
private java.lang.String unregistrationMethod
private java.lang.Object target
private java.lang.String targetBeanName
private org.springframework.beans.factory.BeanFactory beanFactory
private boolean initialized
private java.util.Map<java.lang.Class<?>,java.util.List<java.lang.reflect.Method>> registrationMethods
private java.util.Map<java.lang.Class<?>,java.util.List<java.lang.reflect.Method>> unregistrationMethods
private boolean isBlueprintCompliant
public OsgiServiceRegistrationListenerAdapter()
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanprivate void retrieveTarget()
private void initialize()
public void registered(java.lang.Object service,
java.util.Map serviceProperties)
OsgiServiceRegistrationListenerMap which can be safely cast to a Dictionary if needed.registered in interface OsgiServiceRegistrationListenerservice - object registered as an OSGi serviceserviceProperties - OSGi service registration propertiespublic void unregistered(java.lang.Object service,
java.util.Map serviceProperties)
OsgiServiceRegistrationListenerMap which can be safely cast to a Dictionary if needed.unregistered in interface OsgiServiceRegistrationListenerservice - object unregistered as a service from the OSGi spaceserviceProperties - OSGi service registration propertiespublic void setRegistrationMethod(java.lang.String registrationMethod)
registrationMethod - The registrationMethod to set.public void setUnregistrationMethod(java.lang.String unregistrationMethod)
unregistrationMethod - The unregistrationMethod to set.public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void setTarget(java.lang.Object target)
target - The target to set.public void setTargetBeanName(java.lang.String targetBeanName)
targetBeanName - The targetBeanName to set.public void setBlueprintCompliant(boolean compliant)