public abstract class AbstractOsgiServiceImportFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<Object>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, BundleContextAware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanNameAware
Constructor and Description |
---|
AbstractOsgiServiceImportFactoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Availability |
getAvailability() |
ClassLoader |
getBeanClassLoader()
Returns the class loader used by this FactoryBean.
|
String |
getBeanName()
Returns the bean name associated with the instance of this class (when running inside the Spring container).
|
org.osgi.framework.BundleContext |
getBundleContext()
Returns the bundleContext used by this FactoryBean.
|
Cardinality |
getCardinality()
Deprecated.
As of Spring DM 2.0, replaced by
getAvailability() |
ImportContextClassLoader |
getContextClassLoader()
Deprecated.
As of Spring DM 2.0, replaced by
getImportContextClassLoader() |
String |
getFilter()
Returns the filter describing the imported service(s).
|
ImportContextClassLoaderEnum |
getImportContextClassLoader()
Returns the context class loader management strategy.
|
Class<?>[] |
getInterfaces()
Returns the interfaces used for discovering the imported service(s).
|
OsgiServiceLifecycleListener[] |
getListeners()
Returns the listeners interested in receiving events for this importer.
|
org.osgi.framework.Filter |
getUnifiedFilter()
Assembles the configuration properties into one unified OSGi filter.
|
void |
setAvailability(Availability availability)
Sets the importer availability.
|
void |
setBeanClassLoader(ClassLoader classLoader)
This method is called automatically by the container.
|
void |
setBeanName(String name) |
void |
setBundleContext(org.osgi.framework.BundleContext context)
Set the
BundleContext that this bean runs in. |
void |
setCardinality(Cardinality cardinality)
Deprecated.
As of Spring DM 2.0, replaced by
setAvailability(Availability) |
void |
setContextClassLoader(ImportContextClassLoader contextClassLoader)
Deprecated.
As of Spring DM 2.0, replaced by
#setImportContextClassLoader(ImportContextClassLoaderEnum)) |
void |
setFilter(String filter)
Sets the OSGi service filter.
|
void |
setImportContextClassLoader(ImportContextClassLoaderEnum contextClassLoader)
Sets the thread context class loader management strategy to use for services imported by this service.
|
void |
setInterfaces(Class<?>[] interfaces)
Sets the classes that the imported service advertises.
|
void |
setListeners(OsgiServiceLifecycleListener[] listeners)
Sets the lifecycle listeners interested in receiving events for this importer.
|
void |
setServiceBeanName(String serviceBeanName)
Sets the OSGi service bean name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AbstractOsgiServiceImportFactoryBean()
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public org.osgi.framework.Filter getUnifiedFilter()
public void setInterfaces(Class<?>[] interfaces)
interfaces
- array of advertised classes.public void setContextClassLoader(ImportContextClassLoader contextClassLoader)
#setImportContextClassLoader(ImportContextClassLoaderEnum))
ImportContextClassLoader.CLIENT
is used.contextClassLoader
- import context class loader management strategyImportContextClassLoader
public void setImportContextClassLoader(ImportContextClassLoaderEnum contextClassLoader)
ImportContextClassLoaderEnum.CLIENT
is used.contextClassLoader
- import context class loader management strategyImportContextClassLoader
public void setBundleContext(org.osgi.framework.BundleContext context)
BundleContextAware
BundleContext
that this bean runs in. Normally this can
be used to initialize an object.setBundleContext
in interface BundleContextAware
context
- the BundleContext
object to be used
by this objectpublic void setFilter(String filter)
filter
- OSGi filter describing the importing OSGi servicepublic void setListeners(OsgiServiceLifecycleListener[] listeners)
listeners
- importer listenerspublic void setServiceBeanName(String serviceBeanName)
serviceBeanName
- importer service bean namepublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
public ClassLoader getBeanClassLoader()
public org.osgi.framework.BundleContext getBundleContext()
public Class<?>[] getInterfaces()
public String getFilter()
public OsgiServiceLifecycleListener[] getListeners()
public ImportContextClassLoader getContextClassLoader()
getImportContextClassLoader()
public ImportContextClassLoaderEnum getImportContextClassLoader()
public Cardinality getCardinality()
getAvailability()
public Availability getAvailability()
public void setCardinality(Cardinality cardinality)
setAvailability(Availability)
cardinality
- importer cardinality.public void setAvailability(Availability availability)
Availability.MANDATORY
availability
- public String getBeanName()
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
Copyright © 2006–2014. All rights reserved.