org.knopflerfish.framework.ServiceRegistrationImpl Class Reference

Inheritance diagram for org.knopflerfish.framework.ServiceRegistrationImpl:

org.osgi.framework.ServiceRegistration

List of all members.


Detailed Description

Implementation of the ServiceRegistration object.

See also:
org.osgi.framework.ServiceRegistration
Author:
Jan Stein

Definition at line 51 of file ServiceRegistrationImpl.java.


Public Member Functions

ServiceReference getReference ()
 Returns a ServiceReference object for this registration.
void setProperties (Dictionary props)
 Update the properties associated with this service.
void unregister ()
 Unregister the service.

Package Functions

 ServiceRegistrationImpl (BundleImpl b, Object s, PropertiesDictionary props)
 Avoid recursive unregistrations.
boolean isUsedByBundle (Bundle b)
 Check if a bundle uses this service.

Package Attributes

BundleImpl bundle
 Bundle registering this service.
Object service
 Service or ServiceFactory object.
ServiceReferenceImpl reference
 Reference object to this service registration.
PropertiesDictionary properties
 Service properties.
HashMap dependents = new HashMap()
 Bundles dependent on this service.
HashMap serviceInstances = new HashMap()
 Object instances that factory has produced.
boolean available
 Is service available.

Constructor & Destructor Documentation

org.knopflerfish.framework.ServiceRegistrationImpl.ServiceRegistrationImpl ( BundleImpl  b,
Object  s,
PropertiesDictionary  props 
) [package]

Avoid recursive unregistrations.

Construct a ServiceRegistration for a registered service.

Parameters:
b Bundle providing service.
s Service object.
props Properties describing service.

Definition at line 107 of file ServiceRegistrationImpl.java.

References org.knopflerfish.framework.ServiceRegistrationImpl.available, org.knopflerfish.framework.ServiceRegistrationImpl.bundle, org.knopflerfish.framework.ServiceRegistrationImpl.properties, org.knopflerfish.framework.ServiceRegistrationImpl.reference, and org.knopflerfish.framework.ServiceRegistrationImpl.service.


Member Function Documentation

ServiceReference org.knopflerfish.framework.ServiceRegistrationImpl.getReference (  ) 

Returns a ServiceReference object for this registration.

See also:
org.osgi.framework.ServiceRegistration.getReference

Implements org.osgi.framework.ServiceRegistration.

Definition at line 124 of file ServiceRegistrationImpl.java.

References org.knopflerfish.framework.ServiceRegistrationImpl.reference.

Referenced by org.knopflerfish.framework.Services.get().

void org.knopflerfish.framework.ServiceRegistrationImpl.setProperties ( Dictionary  props  ) 

Update the properties associated with this service.

See also:
org.osgi.framework.ServiceRegistration.setProperties

Implements org.osgi.framework.ServiceRegistration.

Definition at line 139 of file ServiceRegistrationImpl.java.

References org.knopflerfish.framework.ServiceRegistrationImpl.available, org.knopflerfish.framework.ServiceRegistrationImpl.bundle, org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.PropertiesDictionary.get(), org.knopflerfish.framework.Framework.listeners, org.knopflerfish.framework.ServiceRegistrationImpl.properties, org.knopflerfish.framework.ServiceRegistrationImpl.reference, and org.knopflerfish.framework.Listeners.serviceChanged().

void org.knopflerfish.framework.ServiceRegistrationImpl.unregister (  ) 

Unregister the service.

See also:
org.osgi.framework.ServiceRegistration.unregister

Implements org.osgi.framework.ServiceRegistration.

Definition at line 159 of file ServiceRegistrationImpl.java.

References org.knopflerfish.framework.ServiceRegistrationImpl.bundle, org.knopflerfish.framework.PermissionOps.callUnregister0(), org.knopflerfish.framework.ServiceRegistrationImpl.dependents, org.knopflerfish.framework.BundleImpl.framework, org.knopflerfish.framework.Framework.listeners, org.knopflerfish.framework.Framework.perm, org.knopflerfish.framework.ServiceRegistrationImpl.properties, org.knopflerfish.framework.ServiceRegistrationImpl.reference, org.knopflerfish.framework.ServiceRegistrationImpl.service, org.knopflerfish.framework.Listeners.serviceChanged(), and org.knopflerfish.framework.ServiceRegistrationImpl.serviceInstances.

boolean org.knopflerfish.framework.ServiceRegistrationImpl.isUsedByBundle ( Bundle  b  )  [package]

Check if a bundle uses this service.

Parameters:
b Bundle to check
Returns:
true if bundle uses this service

Definition at line 205 of file ServiceRegistrationImpl.java.

References org.knopflerfish.framework.ServiceRegistrationImpl.dependents.

Referenced by org.knopflerfish.framework.Services.getUsedByBundle().


Member Data Documentation

HashMap org.knopflerfish.framework.ServiceRegistrationImpl.dependents = new HashMap() [package]

Bundles dependent on this service.

Integer is used as reference counter, counting number of unbalanced getService().

Definition at line 77 of file ServiceRegistrationImpl.java.

Referenced by org.knopflerfish.framework.ServiceReferenceImpl.getService(), org.knopflerfish.framework.ServiceReferenceImpl.getUsingBundles(), org.knopflerfish.framework.ServiceRegistrationImpl.isUsedByBundle(), org.knopflerfish.framework.ServiceReferenceImpl.ungetService(), and org.knopflerfish.framework.ServiceRegistrationImpl.unregister().


The documentation for this class was generated from the following file:
Generated on Mon Jan 11 21:19:19 2010 for OpenMobileIS by  doxygen 1.5.4