|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.metatype.internal.MetaTypeInformationImpl
org.apache.felix.metatype.internal.ServiceMetaTypeInformation
public class ServiceMetaTypeInformation
The ServiceMetaTypeInformation extends the
MetaTypeInformationImpl adding support to register and unregister
ManagedServices and ManagedServiceFactorys
also implementing the MetaTypeProvider interface.
| Field Summary |
|---|
| Fields inherited from class org.apache.felix.metatype.internal.MetaTypeInformationImpl |
|---|
SERVICE_FACTORYPID |
| Constructor Summary | |
|---|---|
ServiceMetaTypeInformation(BundleContext bundleContext,
Bundle bundle)
Creates an instance of this class handling services of the given bundle. |
|
| Method Summary | |
|---|---|
protected void |
addService(ServiceReference serviceRef)
Registers the service described by the serviceRef with
this instance if the service is a MetaTypeProvider
instance and either a service.factoryPid or
service.pid property is set in the service registration
properties. |
protected void |
removeService(ServiceReference serviceRef)
Unregisters the service described by the serviceRef from
this instance. |
void |
serviceChanged(ServiceEvent event)
Handles service registration and unregistration events ignoring all services not belonging to the Bundle which is handled by
this instance. |
| Methods inherited from class org.apache.felix.metatype.internal.MetaTypeInformationImpl |
|---|
addFactoryPids, addMetaData, addMetaTypeProvider, addPids, getBundle, getFactoryPids, getLocales, getObjectClassDefinition, getPids, removeFactoryPid, removeMetaTypeProvider, removePid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceMetaTypeInformation(BundleContext bundleContext,
Bundle bundle)
bundle.
bundleContext - The BundleContext used to get and
unget services.bundle - The Bundle whose services are handled by
this class.| Method Detail |
|---|
public void serviceChanged(ServiceEvent event)
Bundle which is handled by
this instance.
serviceChanged in interface ServiceListenerevent - The ServiceEventprotected void addService(ServiceReference serviceRef)
serviceRef with
this instance if the service is a MetaTypeProvider
instance and either a service.factoryPid or
service.pid property is set in the service registration
properties.
If the service is registered, this bundle keeps a reference, which is ungot when the service is unregistered or this bundle is stopped.
serviceRef - The ServiceReference describing the
service to be checked and handled.protected void removeService(ServiceReference serviceRef)
serviceRef from
this instance. Unregistration just checks for the
service.factoryPid and service.pid service
properties but does not care whether the service implements the
MetaTypeProvider interface. If the service is registered
it is simply unregistered.
If the service is actually unregistered the reference retrieved by the registration method is ungotten.
serviceRef - The ServiceReference describing the
service to be unregistered.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||