| Constructor and Description |
|---|
ServiceCollection(org.osgi.framework.BundleContext context,
Class<T> serviceClass)
Creates a new service tracker collection, using the specified service context and the default service collection
listener.
|
ServiceCollection(org.osgi.framework.BundleContext context,
Class<T> serviceClass,
ServiceCollectionListener<T> collectionListener)
Creates a new service tracker collection, using the specified service context and listener.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
iterator()
Returns an iterator over the tracked services at the call point in time.
|
protected void |
onStart()
Creates a service tracker and opens it.
|
protected void |
onStop()
Closes the service tracker and releases resources.
|
public ServiceCollection(org.osgi.framework.BundleContext context,
Class<T> serviceClass)
context - bundle contextserviceClass - class of the services to be trackedpublic ServiceCollection(org.osgi.framework.BundleContext context,
Class<T> serviceClass,
ServiceCollectionListener<T> collectionListener)
context - bundle contextserviceClass - class of the services to be trackedcollectionListener - service events listenerpublic Iterator<T> iterator()
iterator in interface Iterable<T>Iterable.iterator()protected void onStart()
onStart in class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycleAbstractLifecycle.onStart()protected void onStop()
onStop in class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycleAbstractLifecycle.onStop()Copyright © 2006–2015 OPS4J - Open Participation Software for Java. All rights reserved.