A {@code ServiceTracker} object is constructed with search criteria and a{@code ServiceTrackerCustomizer} object. A {@code ServiceTracker} can use a{@code ServiceTrackerCustomizer} to customize the service objects to betracked. The {@code ServiceTracker} can then be opened to begin tracking allservices in the Framework's service registry that match the specified search criteria. The {@code ServiceTracker} correctly handles all of the details oflistening to {@code ServiceEvent}s and getting and ungetting services.
The {@code getServiceReferences} method can be called to get references tothe services being tracked. The {@code getService} and {@code getServices}methods can be called to get the service objects for the tracked service.
The {@code ServiceTracker} class is thread-safe. It does not call a{@code ServiceTrackerCustomizer} while holding any locks.{@code ServiceTrackerCustomizer} implementations must also be thread-safe. @param < S> The type of the service being tracked. @param < T> The type of the tracked object. @ThreadSafe @author $Id: a0af979aa9c88a89f220c1b2d8d7c060ced41006 $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|