Returns the bundle that registered the service referenced by this
ServiceReference
object.
This method must return null
when the service has been
unregistered. This can be used to determine if the service has been
unregistered.
The bundle that registered the service referenced by this
ServiceReference
object; null
if that service has
already been unregistered.
BundleContext#registerService(String[],Object,Dictionary)
Returns a copy of the properties of the service referenced by this
ServiceReference
object.
This method will continue to return the properties after the service has
been unregistered. This is so references to unregistered services (for
example, ServiceReference
objects stored in the log) can still be
interrogated.
The returned Dictionary
object:
Must map property values by using property keys in a
case-insensitive manner.
Must return property keys is a case-preserving manner. This
means that the keys must have the same case as the corresponding key in
the properties Dictionary
that was passed to the
BundleContext#registerService(String[],Object,Dictionary) or
ServiceRegistration#setProperties(Dictionary) methods.
Is the property of the caller and can be modified by the caller but
any changes are not reflected in the properties of the service.
ServiceRegistration#setProperties(Dictionary) must be called to
modify the properties of the service.
A copy of the properties of the service referenced by this
ServiceReference
object
1.9
Returns the property value to which the specified property key is mapped
in the properties Dictionary
object of the service referenced by
this ServiceReference
object.
Property keys are case-insensitive.
This method must continue to return property values after the service has
been unregistered. This is so references to unregistered services (for
example, ServiceReference
objects stored in the log) can still be
interrogated.
The property key.
The property value to which the key is mapped; null
if
there is no property named after the key.
Returns an array of the keys in the properties Dictionary
object
of the service referenced by this ServiceReference
object.
This method will continue to return the keys after the service has been
unregistered. This is so references to unregistered services (for
example, ServiceReference
objects stored in the log) can still be
interrogated.
This method is case-preserving ; this means that every key in the
returned array must have the same case as the corresponding key in the
properties Dictionary
that was passed to the
BundleContext#registerService(String[],Object,Dictionary) or
ServiceRegistration#setProperties(Dictionary) methods.
An array of property keys.
Returns the bundles that are using the service referenced by this
ServiceReference
object. Specifically, this method returns the
bundles whose usage count for that service is greater than zero.
An array of bundles whose usage count for the service referenced
by this ServiceReference
object is greater than zero;
null
if no bundles are currently using that service.
1.1
A reference to a service.
The Framework returns
ServiceReference
objects from theBundleContext.getServiceReference
andBundleContext.getServiceReferences
methods.A
ServiceReference
object may be shared between bundles and can be used to examine the properties of the service and to get the service object.Every service registered in the Framework has a unique
ServiceRegistration
object and may have multiple, distinctServiceReference
objects referring to it.ServiceReference
objects associated with aServiceRegistration
object have the samehashCode
and are considered equal (more specifically, theirequals()
method will returntrue
when compared).If the same service object is registered multiple times,
ServiceReference
objects associated with differentServiceRegistration
objects are not equal.Param: Type
of Service.
See
Thread Safe
Author
$Id: 1454244c30992b7a52ac3838b03bc584c3495816 $