Package org.apache.felix.http.base.internal.whiteboard.tracker

# Class WhiteboardServiceTracker<T>

java.lang.Object
org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>
org.apache.felix.http.base.internal.whiteboard.tracker.WhiteboardServiceTracker<T>

All Implemented Interfaces:
  `org.osgi.util.tracker.ServiceTrackerCustomizer<T,org.osgi.framework.ServiceReference<T>>`

Direct Known Subclasses:
  `FilterTracker`, `JavaxFilterTracker`, `JavaxListenersTracker`, `JavaxPreprocessorTracker`, `JavaxServletTracker`, `ListenersTracker`, `PreprocessorTracker`, `ResourceTracker`, `ServletTracker`

public abstract class WhiteboardServiceTracker<T> extends org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>
Service tracker for all whiteboard services except servlet context helper. This tracker does not get/unget the service objects itself, but just forwards the service reference by creating an info data object. Each sub class creates a different data object.

## Field Summary

### Fields inherited from class org.osgi.util.tracker.ServiceTracker

`context, filter`

## Constructor Summary

Constructors
Constructor
Description
`WhiteboardServiceTracker(WhiteboardManager contextManager, org.osgi.framework.BundleContext bundleContext, String filterExpr)`
Create a new tracker

## Method Summary

Modifier and Type
Method
Description
`final org.osgi.framework.ServiceReference<T>`
`addingService(org.osgi.framework.ServiceReference<T> ref)`
`void`
`close()`
`protected abstract WhiteboardServiceInfo<T>`
`getServiceInfo(org.osgi.framework.ServiceReference<T> ref)`
Implemented by sub classes to create the correct whiteboard service info object.
`final void`
`modifiedService(org.osgi.framework.ServiceReference<T> ref, org.osgi.framework.ServiceReference<T> service)`
`final void`
`removedService(org.osgi.framework.ServiceReference<T> ref, org.osgi.framework.ServiceReference<T> service)`

### Methods inherited from class org.osgi.util.tracker.ServiceTracker

`getService, getService, getServiceReference, getServiceReferences, getServices, getServices, getTracked, getTrackingCount, isEmpty, open, open, remove, size, waitForService`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WhiteboardServiceTracker

public WhiteboardServiceTracker(WhiteboardManager contextManager, org.osgi.framework.BundleContext bundleContext, String filterExpr)
Create a new tracker

Parameters:
  `contextManager` - The context manager
  `bundleContext` - The bundle context.
  `filterExpr` - The filter expression for the services to track

## Method Details

### close

public void close()

Overrides:
  `close` in class `org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>`

### addingService

public final org.osgi.framework.ServiceReference<T> addingService(org.osgi.framework.ServiceReference<T> ref)

Specified by:
  `addingService` in interface `org.osgi.util.tracker.ServiceTrackerCustomizer<T,org.osgi.framework.ServiceReference<T>>`
Overrides:
  `addingService` in class `org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>`

### modifiedService

public final void modifiedService(org.osgi.framework.ServiceReference<T> ref, org.osgi.framework.ServiceReference<T> service)

Specified by:
  `modifiedService` in interface `org.osgi.util.tracker.ServiceTrackerCustomizer<T,org.osgi.framework.ServiceReference<T>>`
Overrides:
  `modifiedService` in class `org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>`

### removedService

public final void removedService(org.osgi.framework.ServiceReference<T> ref, org.osgi.framework.ServiceReference<T> service)

Specified by:
  `removedService` in interface `org.osgi.util.tracker.ServiceTrackerCustomizer<T,org.osgi.framework.ServiceReference<T>>`
Overrides:
  `removedService` in class `org.osgi.util.tracker.ServiceTracker<T,org.osgi.framework.ServiceReference<T>>`

### getServiceInfo

protected abstract WhiteboardServiceInfo<T> getServiceInfo(org.osgi.framework.ServiceReference<T> ref)
Implemented by sub classes to create the correct whiteboard service info object.

Parameters:
  `ref` - The service reference
Returns:
  A whiteboard service info