Class ObserverTracker
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.commit.ObserverTracker
-
- All Implemented Interfaces:
ServiceTrackerCustomizer
public class ObserverTracker extends java.lang.Object implements ServiceTrackerCustomizer
-
-
Constructor Summary
Constructors Constructor Description ObserverTracker(@NotNull Observable observable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
addingService(ServiceReference reference)
A service is being added to theServiceTracker
.void
modifiedService(ServiceReference reference, java.lang.Object service)
A service tracked by theServiceTracker
has been modified.void
removedService(ServiceReference reference, java.lang.Object service)
A service tracked by theServiceTracker
has been removed.void
start(@NotNull BundleContext bundleContext)
void
stop()
-
-
-
Constructor Detail
-
ObserverTracker
public ObserverTracker(@NotNull @NotNull Observable observable)
-
-
Method Detail
-
start
public void start(@NotNull @NotNull BundleContext bundleContext)
-
stop
public void stop()
-
addingService
public java.lang.Object addingService(ServiceReference reference)
Description copied from interface:ServiceTrackerCustomizer
A service is being added to theServiceTracker
.This method is called before a service which matched the search parameters of the
ServiceTracker
is added to theServiceTracker
. This method should return the service object to be tracked for the specifiedServiceReference
. The returned service object is stored in theServiceTracker
and is available from thegetService
andgetServices
methods.- Specified by:
addingService
in interfaceServiceTrackerCustomizer
- Parameters:
reference
- The reference to the service being added to theServiceTracker
.- Returns:
- The service object to be tracked for the specified referenced
service or
null
if the specified referenced service should not be tracked.
-
modifiedService
public void modifiedService(ServiceReference reference, java.lang.Object service)
Description copied from interface:ServiceTrackerCustomizer
A service tracked by theServiceTracker
has been modified.This method is called when a service being tracked by the
ServiceTracker
has had it properties modified.- Specified by:
modifiedService
in interfaceServiceTrackerCustomizer
- Parameters:
reference
- The reference to the service that has been modified.service
- The service object for the specified referenced service.
-
removedService
public void removedService(ServiceReference reference, java.lang.Object service)
Description copied from interface:ServiceTrackerCustomizer
A service tracked by theServiceTracker
has been removed.This method is called after a service is no longer being tracked by the
ServiceTracker
.- Specified by:
removedService
in interfaceServiceTrackerCustomizer
- Parameters:
reference
- The reference to the service that has been removed.service
- The service object for the specified referenced service.
-
-