|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ops4j.pax.coin.repository.AbstractTracker<T,U>
public class AbstractTracker<T,U>
Tracks services in OSGi Service Registry and registers/unregisters them with a configured repository.
Constructor Summary | |
---|---|
AbstractTracker(org.osgi.framework.BundleContext bundleContext,
Repository<T> repository,
Class<U> clazz,
String name)
Constructor. |
Method Summary | |
---|---|
protected T |
create(org.osgi.framework.ServiceReference reference,
Object service)
Creates the object of repository type from the service. |
void |
start()
Starts tracking. |
void |
stop()
Stops tracking. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTracker(org.osgi.framework.BundleContext bundleContext, Repository<T> repository, Class<U> clazz, String name)
bundleContext
- bundle contextrepository
- repositoryclazz
- class of tracked servicesname
- name tracked service type.
org.ops4j.lang.NullArgumentException
- - If bundle context is null
- If repository is null
- If clazz is null
- If name is null or emptyMethod Detail |
---|
public void start()
public void stop()
protected T create(org.osgi.framework.ServiceReference reference, Object service)
reference
- service refrence of the tracked serviceservice
- tracked service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |