Allows multiple service objects for a service to be obtained.

For services with Constants#SCOPE_PROTOTYPE prototype scope, multiple service objects for the service can be obtained. Since implementations of PrototypeServiceFactory can return the same service object repeatedly, the framework must use count the returned service objects to release the service object only when its use count returns to zero.

For services with Constants#SCOPE_SINGLETON singleton or Constants#SCOPE_BUNDLE bundle scope, only one, use-counted service object is available to a requesting bundle.

Any unreleased service objects obtained from this ServiceObjects object are automatically released by the framework when the bundle associated with the BundleContext used to create this ServiceObjects object is stopped.

Param: Type

of Service

See

  • BundleContext#getServiceObjects(ServiceReference)
  • PrototypeServiceFactory

Thread Safe

Since

1.8

Author

$Id$

Type Parameters

  • S

Constructors

Constructors