|
||||||||||
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.AbstractDependableServiceImporter org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean
public 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 | |
---|---|
Class |
getObjectType()
|
int |
getRetryTimes()
Returns the number of attempts to rebind a target service before giving up. |
long |
getTimeout()
Returns the timeout (in milliseconds) this importer waits while trying to find a backing service. |
boolean |
isSatisfied()
Indicates if the dependency is satisified or not. |
void |
setCardinality(Cardinality cardinality)
Sets the importer cardinality (0..1, 1..1, 0..N, or 1..N). |
void |
setRetryTimes(int maxRetries)
Sets how many times should this importer attempt to rebind to a target service if the backing service currently used is unregistered. |
void |
setTimeout(long millisBetweenRetries)
Sets how long (in milliseconds) should this importer wait between failed attempts at rebinding to a service that has been unregistered. |
Methods inherited from class org.springframework.osgi.service.importer.support.AbstractOsgiServiceImportFactoryBean |
---|
afterPropertiesSet, destroy, getBeanClassLoader, getBundleContext, getContextClassLoader, getFilter, getInterfaces, getListeners, getObject, getUnifiedFilter, isEagerInit, isPrototype, isSingleton, setBeanClassLoader, setBundleContext, setContextClassLoader, setFilter, setInterfaces, setListeners, setServiceBeanName |
Methods inherited from class org.springframework.osgi.service.importer.support.AbstractDependableServiceImporter |
---|
getCardinality, isMandatory, registerListener |
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 Class getObjectType()
public boolean isSatisfied()
ServiceDependency
public void setRetryTimes(int maxRetries)
maxRetries
- The maxRetries to set.public int getRetryTimes()
public void setTimeout(long millisBetweenRetries)
millisBetweenRetries
- The millisBetweenRetries to set.public long getTimeout()
public void setCardinality(Cardinality cardinality)
setCardinality
in class AbstractDependableServiceImporter
cardinality
- importer cardinality.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |