|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.osgi.util.tracker.ServiceTracker
org.apache.felix.http.whiteboard.internal.tracker.AbstractTracker<T>
public abstract class AbstractTracker<T>
Field Summary |
---|
Fields inherited from class org.osgi.util.tracker.ServiceTracker |
---|
context, filter |
Constructor Summary | |
---|---|
AbstractTracker(BundleContext context,
Class clz)
|
Method Summary | |
---|---|
protected abstract void |
added(T service,
ServiceReference ref)
|
Object |
addingService(ServiceReference ref)
Default implementation of the ServiceTrackerCustomizer.addingService method. |
protected abstract void |
modified(T service,
ServiceReference ref)
|
void |
modifiedService(ServiceReference ref,
Object service)
Default implementation of the ServiceTrackerCustomizer.modifiedService method. |
protected abstract void |
removed(T service)
|
void |
removedService(ServiceReference ref,
Object service)
Default implementation of the ServiceTrackerCustomizer.removedService method. |
Methods inherited from class org.osgi.util.tracker.ServiceTracker |
---|
close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, open, open, remove, size, waitForService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTracker(BundleContext context, Class clz)
Method Detail |
---|
public final Object addingService(ServiceReference ref)
ServiceTracker
ServiceTrackerCustomizer.addingService
method.
This method is only called when this ServiceTracker
has been
constructed with a null ServiceTrackerCustomizer
argument.
This implementation returns the result of calling getService
on the BundleContext
with which this
ServiceTracker
was created passing the specified
ServiceReference
.
This method can be overridden in a subclass to customize the service
object to be tracked for the service being added. In that case, take care
not to rely on the default implementation of
removedService
to unget
the service.
addingService
in interface ServiceTrackerCustomizer
addingService
in class ServiceTracker
ref
- The reference to the service being added to this
ServiceTracker
.
ServiceTracker
.ServiceTrackerCustomizer.addingService(ServiceReference)
public final void modifiedService(ServiceReference ref, Object service)
ServiceTracker
ServiceTrackerCustomizer.modifiedService
method.
This method is only called when this ServiceTracker
has been
constructed with a null ServiceTrackerCustomizer
argument.
This implementation does nothing.
modifiedService
in interface ServiceTrackerCustomizer
modifiedService
in class ServiceTracker
ref
- The reference to modified service.service
- The service object for the modified service.ServiceTrackerCustomizer.modifiedService(ServiceReference, Object)
public final void removedService(ServiceReference ref, Object service)
ServiceTracker
ServiceTrackerCustomizer.removedService
method.
This method is only called when this ServiceTracker
has been
constructed with a null ServiceTrackerCustomizer
argument.
This implementation calls ungetService
, on the
BundleContext
with which this ServiceTracker
was created, passing the specified ServiceReference
.
This method can be overridden in a subclass. If the default
implementation of addingService
method was used, this method must unget the service.
removedService
in interface ServiceTrackerCustomizer
removedService
in class ServiceTracker
ref
- The reference to removed service.service
- The service object for the removed service.ServiceTrackerCustomizer.removedService(ServiceReference, Object)
protected abstract void modified(T service, ServiceReference ref)
protected abstract void added(T service, ServiceReference ref)
protected abstract void removed(T service)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |