|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.swissbox.lifecycle.AbstractLifecycle
org.ops4j.pax.swissbox.tracker.ServiceCollection<T>
public class ServiceCollection<T>
A collection of tracked services.
Constructor Summary | |
---|---|
ServiceCollection(org.osgi.framework.BundleContext context,
java.lang.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,
java.lang.Class<T> serviceClass,
ServiceCollectionListener<T> collectionListener)
Creates a new service tracker collection, using the specified service context and listener. |
Method Summary | |
---|---|
java.util.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. |
Methods inherited from class org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle |
---|
isStarted, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceCollection(org.osgi.framework.BundleContext context, java.lang.Class<T> serviceClass)
context
- bundle contextserviceClass
- class of the services to be trackedpublic ServiceCollection(org.osgi.framework.BundleContext context, java.lang.Class<T> serviceClass, ServiceCollectionListener<T> collectionListener)
context
- bundle contextserviceClass
- class of the services to be trackedcollectionListener
- service events listenerMethod Detail |
---|
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
Iterable.iterator()
protected void onStart()
onStart
in class AbstractLifecycle
AbstractLifecycle.onStart()
protected void onStop()
onStop
in class AbstractLifecycle
AbstractLifecycle.onStop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |