public class EventAdminAdapter extends Object implements ServiceTrackerCustomizer<Object,Object>
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_TOPIC |
Constructor and Description |
---|
EventAdminAdapter(BundleContext context,
ExtendedLogReaderServiceFactory logReaderServiceFactory) |
Modifier and Type | Method and Description |
---|---|
Object |
addingService(ServiceReference<Object> reference)
A service is being added to the
ServiceTracker . |
void |
modifiedService(ServiceReference<Object> reference,
Object tracked)
A service tracked by the
ServiceTracker has been modified. |
void |
removedService(ServiceReference<Object> reference,
Object tracked)
A service tracked by the
ServiceTracker has been removed. |
void |
start() |
void |
stop() |
public static final String EVENT_TOPIC
public EventAdminAdapter(BundleContext context, ExtendedLogReaderServiceFactory logReaderServiceFactory)
public void start()
public void stop()
public Object addingService(ServiceReference<Object> reference)
ServiceTrackerCustomizer
ServiceTracker
.
This method is called before a service which matched the search
parameters of the ServiceTracker
is added to the
ServiceTracker
. This method should return the service object to
be tracked for the specified ServiceReference
. The returned
service object is stored in the ServiceTracker
and is available
from the getService
and getServices
methods.
addingService
in interface ServiceTrackerCustomizer<Object,Object>
reference
- The reference to the service being added to the
ServiceTracker
.null
if the specified referenced service
should not be tracked.public void modifiedService(ServiceReference<Object> reference, Object tracked)
ServiceTrackerCustomizer
ServiceTracker
has been modified.
This method is called when a service being tracked by the
ServiceTracker
has had it properties modified.
modifiedService
in interface ServiceTrackerCustomizer<Object,Object>
reference
- The reference to the service that has been modified.tracked
- The service object for the specified referenced service.public void removedService(ServiceReference<Object> reference, Object tracked)
ServiceTrackerCustomizer
ServiceTracker
has been removed.
This method is called after a service is no longer being tracked by the
ServiceTracker
.
removedService
in interface ServiceTrackerCustomizer<Object,Object>
reference
- The reference to the service that has been removed.tracked
- The service object for the specified referenced service.Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.