|
||||||||||
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 org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean
public final class OsgiServiceProxyFactoryBean
OSGi (single) service importer. This implementation creates a managed OSGi service proxy that handles the OSGi service dynamics. The returned proxy will select only the best matching OSGi service for the configuration criteria. If the select service goes away (at any point in time), the proxy will automatically search for a replacement without the user intervention.
Note that the proxy instance remains the same and only the backing OSGi service changes. Due to the dynamic nature of OSGi, the backing object can change during method invocations.
Constructor Summary | |
---|---|
OsgiServiceProxyFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
Object |
getObject()
Returns a managed object for accessing OSGi service(s). |
Class<?> |
getObjectType()
Returns the managed proxy type. |
long |
getTimeout()
Returns the timeout (in milliseconds) this importer waits while trying to find a backing service. |
boolean |
isEagerInit()
The object created by this factory bean is eagerly initialized. |
boolean |
isPrototype()
The object returned by this FactoryBean is a not a prototype. |
boolean |
isSingleton()
The object managed by this factory is a singleton. |
void |
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
|
void |
setBeanClassLoader(ClassLoader classLoader)
This method is called automatically by the container. |
void |
setBlueprintCompliant(boolean compliant)
Indicates whether the importer should use (strict) blueprint spec compliance or not. |
void |
setSticky(boolean sticky)
Sets the stickiness of this proxy. |
void |
setTimeout(long timeoutInMillis)
Sets how long (in milliseconds) should this importer wait between failed attempts at rebinding to a service that has been unregistered. |
void |
setUseBlueprintExceptions(boolean useBlueprintExceptions)
Indicates whether Blueprint exceptions are preferred over Spring DM ones. |
Methods inherited from class org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean |
---|
getAvailability, getBeanClassLoader, getBeanName, getBundleContext, getCardinality, getContextClassLoader, getFilter, getImportContextClassLoader, getInterfaces, getListeners, getUnifiedFilter, setAvailability, setBeanName, setBundleContext, setCardinality, setContextClassLoader, setFilter, setImportContextClassLoader, setInterfaces, setListeners, setServiceBeanName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OsgiServiceProxyFactoryBean()
Method Detail |
---|
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public Object getObject()
getObject
in interface FactoryBean<Object>
public void setTimeout(long timeoutInMillis)
timeoutInMillis
- Timeout to set, in millisecondspublic long getTimeout()
public void setSticky(boolean sticky)
sticky
- sticky flagpublic void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher
in interface ApplicationEventPublisherAware
public void destroy() throws Exception
destroy
in interface DisposableBean
Exception
public Class<?> getObjectType()
getObjectType
in interface FactoryBean<Object>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Object>
public boolean isEagerInit()
isEagerInit
in interface SmartFactoryBean<Object>
public boolean isPrototype()
isPrototype
in interface SmartFactoryBean<Object>
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
setBeanClassLoader
in class AbstractOsgiServiceImportFactoryBean
public void setUseBlueprintExceptions(boolean useBlueprintExceptions)
useBlueprintExceptions
- public void setBlueprintCompliant(boolean compliant)
compliant
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |