/** * Get the value of a service's property. * * @see org.osgi.framework.ServiceReference#getProperty */ public Object getProperty(String key) { return cloneObject(registration.getProperty(key)); }
/** * Get the list of key names for the service's properties. * * @see org.osgi.framework.ServiceReference#getPropertyKeys */ public String[] getPropertyKeys() { return registration.getProperties().keyArray(); }
/** * Get all properties registered with this service. * * @return Dictionary containing properties or null if service has been removed. */ PropertiesDictionary getProperties() { return registration.getProperties(); }
/** * Unget the service object. * * @param bundle Bundle who wants remove service. * @return True if service was used, otherwise false. */ boolean ungetService(BundleImpl bundle) { return registration.ungetService(bundle, true); }
/** * Get the service object. * * @param bundle requester of service. * @return Service requested or null in case of failure. */ S getService(final BundleImpl bundle) { bundle.fwCtx.perm.checkGetServicePerms(this); return registration.getService(bundle); }
/** * Return the bundles that are using the service wrapped by this ServiceReference, i.e., whose * usage count for this service is greater than zero. * * @return array of bundles whose usage count for the service wrapped by this ServiceReference is * greater than zero, or <tt>null</tt> if no bundles currently are using this service * @since 1.1 */ public Bundle[] getUsingBundles() { return registration.getUsingBundles(); }
/** * Return a hashcode for the service. * * @see org.osgi.framework.ServiceReference */ @Override public int hashCode() { return registration.hashCode(); }