|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean
public abstract class AbstractOsgiServiceImportFactoryBean
Base class for importing OSGi services. Provides the common properties and contracts between importers.
Constructor Summary | |
---|---|
AbstractOsgiServiceImportFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
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). |
BundleContext |
getBundleContext()
Returns the bundleContext used by this FactoryBean. |
Cardinality |
getCardinality()
Returns the cardinality used by this importer. |
ImportContextClassLoader |
getContextClassLoader()
Returns the context class loader management strategy. |
String |
getFilter()
Returns the filter describing the imported service(s). |
Class[] |
getInterfaces()
Returns the interfaces used for discovering the imported service(s). |
OsgiServiceLifecycleListener[] |
getListeners()
Returns the listeners interested in receiving events for this importer. |
Filter |
getUnifiedFilter()
Assembles the configuration properties into one unified OSGi filter. |
void |
setBeanClassLoader(ClassLoader classLoader)
This method is called automatically by the container. |
void |
setBeanName(String name)
|
void |
setBundleContext(BundleContext context)
Set the BundleContext that this bean runs in. |
void |
setCardinality(Cardinality cardinality)
Sets the importer cardinality (0..1, 1..1, 0..N, or 1..N). |
void |
setContextClassLoader(ImportContextClassLoader contextClassLoader)
Sets the thread context class loader management strategy to use for services imported by this service. |
void |
setFilter(String filter)
Sets the OSGi service filter. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.beans.factory.FactoryBean |
---|
getObject, getObjectType, isSingleton |
Methods inherited from interface org.springframework.beans.factory.DisposableBean |
---|
destroy |
Constructor Detail |
---|
public AbstractOsgiServiceImportFactoryBean()
Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public Filter getUnifiedFilter()
public void setInterfaces(Class[] interfaces)
interfaces
- array of advertised classes.public void setContextClassLoader(ImportContextClassLoader contextClassLoader)
ImportContextClassLoader.CLIENT
is used.
contextClassLoader
- import context class loader management strategyImportContextClassLoader
public void setBundleContext(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 BeanClassLoaderAware
public ClassLoader getBeanClassLoader()
public BundleContext getBundleContext()
public Class[] getInterfaces()
public String getFilter()
public OsgiServiceLifecycleListener[] getListeners()
public ImportContextClassLoader getContextClassLoader()
public Cardinality getCardinality()
public void setCardinality(Cardinality cardinality)
cardinality
- importer cardinality.public String getBeanName()
public void setBeanName(String name)
setBeanName
in interface BeanNameAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |