|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.dm.impl.ServiceRegistrationImpl
public final class ServiceRegistrationImpl
A wrapper around a service registration that blocks until the service registration is available.
Field Summary | |
---|---|
static ServiceRegistrationImpl |
ILLEGAL_STATE
|
Constructor Summary | |
---|---|
ServiceRegistrationImpl()
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
ServiceReference |
getReference()
Returns a ServiceReference object for a service being
registered. |
int |
hashCode()
|
void |
setProperties(Dictionary dictionary)
Updates the properties associated with a service. |
String |
toString()
|
void |
unregister()
Unregisters a service. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ServiceRegistrationImpl ILLEGAL_STATE
Constructor Detail |
---|
public ServiceRegistrationImpl()
Method Detail |
---|
public ServiceReference getReference()
ServiceRegistration
ServiceReference
object for a service being
registered.
The ServiceReference
object may be shared with other
bundles.
getReference
in interface ServiceRegistration
ServiceReference
object.public void setProperties(Dictionary dictionary)
ServiceRegistration
The Constants.OBJECTCLASS
and Constants.SERVICE_ID
keys
cannot be modified by this method. These values are set by the Framework
when the service is registered in the OSGi environment.
The following steps are required to modify service properties:
ServiceEvent.MODIFIED
is fired.
setProperties
in interface ServiceRegistration
dictionary
- The properties for this service. See Constants
for a list of standard service property keys. Changes should not
be made to this object after calling this method. To update the
service's properties this method should be called again.public void unregister()
ServiceRegistration
ServiceRegistration
object
from the Framework service registry. All ServiceReference
objects associated with this ServiceRegistration
object
can no longer be used to interact with the service once unregistration is
complete.
The following steps are required to unregister a service:
ServiceEvent.UNREGISTERING
is fired
so that bundles using this service can release their use of the service.
Once delivery of the service event is complete, the
ServiceReference
objects for the service may no longer be
used to get a service object for the service.
ServiceFactory
object, the
ServiceFactory.ungetService
method is called to release
the service object for the bundle.
unregister
in interface ServiceRegistration
BundleContext.ungetService(org.osgi.framework.ServiceReference)
,
ServiceFactory.ungetService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration, java.lang.Object)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |