public class ServiceRegistrationImpl
extends java.lang.Object
implements org.osgi.framework.ServiceRegistration
| Constructor and Description |
|---|
ServiceRegistrationImpl(ServiceRegistry registry,
ComponentInstance instance,
java.lang.String[] classes,
java.lang.Long serviceId,
java.lang.Object svcObj,
java.util.Dictionary dict)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Dictionary |
getProperties()
Gets the published properties.
|
protected java.lang.Object |
getProperty(java.lang.String key)
Look for a property in the service properties.
|
protected java.lang.String[] |
getPropertyKeys()
Get the property keys.
|
org.osgi.framework.ServiceReference |
getReference()
Get the service reference attached with this service registration.
|
protected java.lang.Object |
getService()
Get the service object.
|
protected boolean |
isValid()
Check if the service registration still valid.
|
void |
setProperties(java.util.Dictionary dict)
Add properties to a service registration.
|
void |
ungetService(ComponentInstance instance,
java.lang.Object srvObj)
Unget a service.
|
void |
unregister()
Unregister the service.
|
public ServiceRegistrationImpl(ServiceRegistry registry, ComponentInstance instance, java.lang.String[] classes, java.lang.Long serviceId, java.lang.Object svcObj, java.util.Dictionary dict)
registry - : the service registryinstance - : component instanceclasses - : published interfaces arrayserviceId - : the unique service idsvcObj - : the service object or the service factory objectdict - : service propertiesprotected boolean isValid()
public org.osgi.framework.ServiceReference getReference()
getReference in interface org.osgi.framework.ServiceRegistrationServiceRegistration.getReference()public void setProperties(java.util.Dictionary dict)
setProperties in interface org.osgi.framework.ServiceRegistrationdict - : the properties to addServiceRegistration.setProperties(java.util.Dictionary)public void unregister()
unregister in interface org.osgi.framework.ServiceRegistrationServiceRegistration.unregister()protected java.lang.Object getProperty(java.lang.String key)
key - : property keyprotected java.lang.String[] getPropertyKeys()
protected java.util.Dictionary getProperties()
protected java.lang.Object getService()
public void ungetService(ComponentInstance instance, java.lang.Object srvObj)
instance - : component instance using the service.srvObj - : the unget service object.Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.