The Framework returns {@code ServiceReference} objects from the{@code BundleContext.getServiceReference} and{@code BundleContext.getServiceReferences} methods.
A {@code ServiceReference} object may be shared between bundles and can beused to examine the properties of the service and to get the service object.
Every service registered in the Framework has a unique {@code ServiceRegistration} object and may have multiple, distinct{@code ServiceReference} objects referring to it. {@code ServiceReference}objects associated with a {@code ServiceRegistration} object have the same{@code hashCode} and are considered equal (more specifically, their{@code equals()} method will return {@code true} when compared).
If the same service object is registered multiple times, {@code ServiceReference} objects associated with different{@code ServiceRegistration} objects are not equal. @param < S> Type of Service. @see BundleContext#getServiceReference(Class) @see BundleContext#getServiceReference(String) @see BundleContext#getServiceReferences(Class,String) @see BundleContext#getServiceReferences(String,String) @see BundleContext#getService(ServiceReference) @see BundleContext#getServiceObjects(ServiceReference) @ThreadSafe @author $Id: a56f8df70e8c74a76a1ef02b714b4612bc064ecc $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|