|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.osgi.internal.service.importer.AbstractServiceImporter org.springframework.osgi.service.importer.AbstractOsgiServiceProxyFactoryBean
public abstract class AbstractOsgiServiceProxyFactoryBean
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).
Field Summary | |
---|---|
protected BundleContext |
bundleContext
|
static String |
CARDINALITY_ATTRIBUTE
|
protected ClassLoader |
classLoader
|
protected int |
contextClassloader
|
protected String |
filter
|
static String |
FILTER_ATTRIBUTE
|
protected boolean |
initialized
|
static String |
INTERFACE_ATTRIBUTE
|
protected TargetSourceLifecycleListener[] |
listeners
|
static String |
OBJECTCLASS
|
protected String |
serviceBeanName
Service Bean property of the OSGi service * |
protected Class[] |
serviceTypes
|
protected Filter |
unifiedFilter
|
Fields inherited from class org.springframework.osgi.internal.service.importer.AbstractServiceImporter |
---|
depedencyListeners, mandatory |
Constructor Summary | |
---|---|
AbstractOsgiServiceProxyFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
abstract void |
destroy()
|
abstract Object |
getObject()
Subclasses have to implement this method and return the approapriate service proxy. |
abstract Class |
getObjectType()
Subclasses have to implement this method and return the approapriate service proxy type. |
Filter |
getUnifiedFilter()
Assemble configuration properties to create an OSGi filter. |
boolean |
isEagerInit()
|
boolean |
isPrototype()
|
boolean |
isSingleton()
|
void |
setBeanClassLoader(ClassLoader classLoader)
|
void |
setBeanName(String beanName)
|
void |
setBundleContext(BundleContext context)
|
void |
setContextClassloader(String classLoaderManagementOption)
|
void |
setFilter(String filter)
|
void |
setInterface(Class[] serviceType)
The type that the OSGi service was registered with |
void |
setListeners(TargetSourceLifecycleListener[] listeners)
|
void |
setServiceBeanName(String serviceBeanName)
To find a bean published as a service by the OsgiServiceExporter, simply set this property. |
Methods inherited from class org.springframework.osgi.internal.service.importer.AbstractServiceImporter |
---|
isMandatory, registerListener, setMandatory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.osgi.internal.service.ServiceImporter |
---|
isSatisfied |
Field Detail |
---|
public static final String FILTER_ATTRIBUTE
public static final String INTERFACE_ATTRIBUTE
public static final String CARDINALITY_ATTRIBUTE
public static final String OBJECTCLASS
protected ClassLoader classLoader
protected BundleContext bundleContext
protected int contextClassloader
protected Class[] serviceTypes
protected String filter
protected Filter unifiedFilter
protected TargetSourceLifecycleListener[] listeners
protected String serviceBeanName
protected boolean initialized
Constructor Detail |
---|
public AbstractOsgiServiceProxyFactoryBean()
Method Detail |
---|
public abstract Object getObject()
getObject
in interface FactoryBean
public abstract Class getObjectType()
getObjectType
in interface FactoryBean
public boolean isSingleton()
isSingleton
in interface FactoryBean
public boolean isEagerInit()
isEagerInit
in interface SmartFactoryBean
public boolean isPrototype()
isPrototype
in interface SmartFactoryBean
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public Filter getUnifiedFilter()
public abstract void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public void setInterface(Class[] serviceType)
public void setContextClassloader(String classLoaderManagementOption)
public void setBundleContext(BundleContext context)
setBundleContext
in interface BundleContextAware
public void setFilter(String filter)
filter
- The filter to set.public void setListeners(TargetSourceLifecycleListener[] listeners)
listeners
- The listeners to set.public void setServiceBeanName(String serviceBeanName)
serviceBeanName
- The serviceBeanName to set.public void setBeanName(String beanName)
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |