public class ServiceReferenceImpl extends java.lang.Object implements ServiceReference
ServiceReference| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Test if ServiceReferences points to same service.
|
Bundle |
getBundle()
Return the bundle which registered the service.
|
java.lang.Object |
getProperty(java.lang.String key)
Get the value of a service's property.
|
java.lang.String[] |
getPropertyKeys()
Get the list of key names for the service's properties.
|
Bundle[] |
getUsingBundles()
Return the bundles that are using the service wrapped by this
ServiceReference, i.e., whose usage count for this service
is greater than zero.
|
int |
hashCode()
Return a hashcode for the service.
|
boolean |
isAssignableTo(Bundle bundle,
java.lang.String className)
Tests if the bundle that registered the service referenced by this
ServiceReference and the specified bundle use the same
source for the package of the specified class name. |
public java.lang.Object getProperty(java.lang.String key)
getProperty in interface ServiceReferencekey - The property key.null
if there is no property named after the key.ServiceReference.getProperty(java.lang.String)public java.lang.String[] getPropertyKeys()
getPropertyKeys in interface ServiceReferenceServiceReference.getPropertyKeys()public Bundle getBundle()
getBundle in interface ServiceReferenceServiceReference object; null if
that service has already been unregistered.ServiceReference.getBundle()public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectServiceReferencepublic int hashCode()
hashCode in class java.lang.ObjectServiceReferencepublic Bundle[] getUsingBundles()
getUsingBundles in interface ServiceReferencepublic boolean isAssignableTo(Bundle bundle, java.lang.String className)
ServiceReferenceServiceReference and the specified bundle use the same
source for the package of the specified class name.
This method performs the following checks:
ServiceReference (registrant bundle); find the source for
the package. If no source is found then return true if the
registrant bundle is equal to the specified bundle; otherwise return
false.true;
otherwise return false.isAssignableTo in interface ServiceReferencebundle - The Bundle object to check.className - The class name to check.true if the bundle which registered the service
referenced by this ServiceReference and the
specified bundle use the same source for the package of the
specified class name. Otherwise false is returned.