public class ServiceReferenceImpl
extends java.lang.Object
implements org.osgi.framework.ServiceReference
Constructor and Description |
---|
ServiceReferenceImpl(ComponentInstance instance,
ServiceRegistrationImpl ref)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object reference)
Service Reference compare method.
|
org.osgi.framework.Bundle |
getBundle()
Not supported in composite.
|
java.util.Dictionary |
getProperties() |
java.lang.Object |
getProperty(java.lang.String name)
Get a property value.
|
java.lang.String[] |
getPropertyKeys()
Get the String arrays of service property keys.
|
ServiceRegistrationImpl |
getServiceRegistration()
Get the service registration for this reference.
|
org.osgi.framework.Bundle[] |
getUsingBundles()
Unsupported Operation inside composite.
|
boolean |
isAssignableTo(org.osgi.framework.Bundle arg0,
java.lang.String arg1)
Check if the current service reference is assignable to the given bundle.
|
public ServiceReferenceImpl(ComponentInstance instance, ServiceRegistrationImpl ref)
instance
- : component instance publishing the service.ref
- : registration attached to this service reference.public org.osgi.framework.Bundle getBundle()
getBundle
in interface org.osgi.framework.ServiceReference
ServiceReference.getBundle()
public ServiceRegistrationImpl getServiceRegistration()
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface org.osgi.framework.ServiceReference
name
- : the key of the required property.ServiceReference.getProperty(java.lang.String)
public java.lang.String[] getPropertyKeys()
getPropertyKeys
in interface org.osgi.framework.ServiceReference
ServiceReference.getPropertyKeys()
public java.util.Dictionary getProperties()
public org.osgi.framework.Bundle[] getUsingBundles()
getUsingBundles
in interface org.osgi.framework.ServiceReference
ServiceReference.getUsingBundles()
public boolean isAssignableTo(org.osgi.framework.Bundle arg0, java.lang.String arg1)
isAssignableTo
in interface org.osgi.framework.ServiceReference
arg0
- : the bundle to checkarg1
- : the class name to check.ServiceReference.isAssignableTo(org.osgi.framework.Bundle, java.lang.String)
public int compareTo(java.lang.Object reference)
compareTo
in interface java.lang.Comparable
compareTo
in interface org.osgi.framework.ServiceReference
reference
- the service referenceUnsupportedOperationException
.ServiceReference.compareTo(java.lang.Object)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.