|
||||||||||
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()
|
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). |
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. |
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(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. |
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)
#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(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()
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 BeanNameAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |