|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.osgi.service.importer.support.AbstractDependableServiceImporter
org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean
public abstract class AbstractOsgiServiceImportFactoryBean
Base class for importing OSGi services. Provides most of the constructs required for assembling the service proxies, leaving subclasses to decide on the service cardinality (one service or multiple).
| Constructor Summary | |
|---|---|
AbstractOsgiServiceImportFactoryBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
ClassLoader |
getBeanClassLoader()
Returns the class loader used by this FactoryBean. |
BundleContext |
getBundleContext()
Returns the bundleContext used by this FactoryBean. |
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. |
Object |
getObject()
Returns a managed hook to access OSGi service(s). |
Filter |
getUnifiedFilter()
Assembles the configuration properties into one unified OSGi filter. |
boolean |
isEagerInit()
|
boolean |
isPrototype()
|
boolean |
isSingleton()
|
void |
setBeanClassLoader(ClassLoader classLoader)
|
void |
setBundleContext(BundleContext context)
Set the BundleContext that this bean runs in. |
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 org.springframework.osgi.service.importer.support.AbstractDependableServiceImporter |
|---|
getCardinality, isMandatory, registerListener, setCardinality |
| 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 |
|---|
getObjectType |
| Methods inherited from interface org.springframework.osgi.service.dependency.ServiceDependency |
|---|
isSatisfied |
| Constructor Detail |
|---|
public AbstractOsgiServiceImportFactoryBean()
| Method Detail |
|---|
public Object getObject()
getObject in interface FactoryBeanpublic boolean isSingleton()
isSingleton in interface FactoryBeanpublic boolean isEagerInit()
isEagerInit in interface SmartFactoryBeanpublic boolean isPrototype()
isPrototype in interface SmartFactoryBeanpublic void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic Filter getUnifiedFilter()
public void destroy()
throws Exception
destroy in interface DisposableBeanExceptionpublic void setInterfaces(Class[] interfaces)
interfaces - array of advertised classes.public void setContextClassLoader(ImportContextClassLoader contextClassLoader)
ImportContextClassLoader.CLIENT is used.
contextClassLoader - import context class loader management strategyImportContextClassLoaderpublic void setBundleContext(BundleContext context)
BundleContextAwareBundleContext that this bean runs in. Normally this can
be used to initialize an object.
setBundleContext in interface BundleContextAwarecontext - 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 BeanClassLoaderAwarepublic ClassLoader getBeanClassLoader()
public BundleContext getBundleContext()
public Class[] getInterfaces()
public String getFilter()
public OsgiServiceLifecycleListener[] getListeners()
public ImportContextClassLoader getContextClassLoader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||