public class OsgiServiceCollection extends Object implements Collection, org.springframework.beans.factory.InitializingBean, CollectionProxy, org.springframework.beans.factory.DisposableBean
Collection| Modifier and Type | Class and Description |
|---|---|
protected class |
OsgiServiceCollection.OsgiServiceIterator
Read-only iterator wrapper around the dynamic collection iterator.
|
| Modifier and Type | Field and Description |
|---|---|
protected DynamicCollection<Object> |
services
The dynamic collection.
|
protected Map<Long,ProxyPlusCallback> |
servicesIdMap |
| Constructor and Description |
|---|
OsgiServiceCollection(org.osgi.framework.Filter filter,
org.osgi.framework.BundleContext context,
ClassLoader classLoader,
ServiceProxyCreator proxyCreator,
boolean useServiceReference) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
void |
afterPropertiesSet() |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
protected DynamicCollection<Object> |
createInternalDynamicStorage()
Create the dynamic storage used internally.
|
void |
destroy() |
boolean |
isEmpty() |
boolean |
isSatisfied()
Is the underlying proxy satisfied?
For dynamic, mandatory imports, this checks the service reference.
|
Iterator<Object> |
iterator() |
protected void |
mandatoryServiceCheck()
Check to see whether at least one service is available.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection c) |
boolean |
retainAll(Collection c) |
void |
setListeners(OsgiServiceLifecycleListener[] listeners) |
void |
setRequiredAtStartup(boolean serviceRequiredAtStartup) |
void |
setServiceImporter(Object importer) |
void |
setServiceImporterName(String name) |
void |
setStateListeners(List<ImporterStateListener> stateListeners) |
void |
setUseBlueprintExceptions(boolean useBlueprintExceptions) |
int |
size() |
Object[] |
toArray() |
Object[] |
toArray(Object[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streamprotected final Map<Long,ProxyPlusCallback> servicesIdMap
protected DynamicCollection<Object> services
public OsgiServiceCollection(org.osgi.framework.Filter filter,
org.osgi.framework.BundleContext context,
ClassLoader classLoader,
ServiceProxyCreator proxyCreator,
boolean useServiceReference)
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void destroy()
destroy in interface org.springframework.beans.factory.DisposableBeanprotected void mandatoryServiceCheck()
public boolean isSatisfied()
CollectionProxyisSatisfied in interface CollectionProxyprotected DynamicCollection<Object> createInternalDynamicStorage()
public void setServiceImporter(Object importer)
public void setServiceImporterName(String name)
public Iterator<Object> iterator()
iterator in interface Iterableiterator in interface Collectionpublic int size()
size in interface Collectionpublic boolean remove(Object o)
remove in interface Collectionpublic boolean removeAll(Collection c)
removeAll in interface Collectionpublic boolean add(Object o)
add in interface Collectionpublic boolean addAll(Collection c)
addAll in interface Collectionpublic void clear()
clear in interface Collectionpublic boolean retainAll(Collection c)
retainAll in interface Collectionpublic boolean contains(Object o)
contains in interface Collectionpublic boolean containsAll(Collection c)
containsAll in interface Collectionpublic boolean isEmpty()
isEmpty in interface Collectionpublic Object[] toArray()
toArray in interface Collectionpublic Object[] toArray(Object[] array)
toArray in interface Collectionpublic void setListeners(OsgiServiceLifecycleListener[] listeners)
listeners - The listeners to set.public void setRequiredAtStartup(boolean serviceRequiredAtStartup)
public void setStateListeners(List<ImporterStateListener> stateListeners)
public void setUseBlueprintExceptions(boolean useBlueprintExceptions)
Copyright © 2006–2017. All rights reserved.