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, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected 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.InitializingBean
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
protected void mandatoryServiceCheck()
public boolean isSatisfied()
CollectionProxy
isSatisfied
in interface CollectionProxy
protected DynamicCollection<Object> createInternalDynamicStorage()
public void setServiceImporter(Object importer)
public void setServiceImporterName(String name)
public Iterator<Object> iterator()
iterator
in interface Iterable
iterator
in interface Collection
public int size()
size
in interface Collection
public boolean remove(Object o)
remove
in interface Collection
public boolean removeAll(Collection c)
removeAll
in interface Collection
public boolean add(Object o)
add
in interface Collection
public boolean addAll(Collection c)
addAll
in interface Collection
public void clear()
clear
in interface Collection
public boolean retainAll(Collection c)
retainAll
in interface Collection
public boolean contains(Object o)
contains
in interface Collection
public boolean containsAll(Collection c)
containsAll
in interface Collection
public boolean isEmpty()
isEmpty
in interface Collection
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] array)
toArray
in interface Collection
public 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–2014. All rights reserved.