Top Description Methods
org.osgi.service.cdi.runtime

public Interface CDIComponentRuntime

Annotations
@ProviderType
Imports
java.util.Collection, org.osgi.annotation.versioning.ProviderType, org.osgi.framework.Bundle, .Constants, org.osgi.service.cdi.runtime.dto.ContainerDTO, org.osgi.service.cdi.runtime.dto.template.ContainerTemplateDTO

The CDIComponentRuntime service represents the actor that manages the CDI containers and their life cycle. The CDIComponentRuntime service allows introspection of the managed CDI containers.

This service must be registered with a Constants#SERVICE_CHANGECOUNT service property that must be updated each time any of the DTOs available from this service change.

Access to this service requires the ServicePermission[CDIComponentRuntime, GET] permission. It is intended that only administrative bundles should be granted this permission to limit access to the potentially intrusive methods provided by this service.

Author
$Id: 30e6f16ae8837cf2188b01d255a5ec9f0bbfb3ae $

Method Summary

Modifier and TypeMethod and Description
public Collection<ContainerDTO>

Returns:

A set of descriptions of the container of the specified bundles. Only bundles that have an associated container are included. If a bundle is listed multiple times in bundles only one ContainerDTO is returned. Returns an empty collection if no CDI containers are found.
getContainerDTOs
(Bundle...
The bundles who's container description snapshots are to be returned. Specifying no bundles, or the equivalent of an empty Bundle array, will return the container descriptions of all active bundles that define a container.
bundles
)

Returns a collection of container description snapshots for a set of bundles.

public ContainerTemplateDTO

Returns:

The container template for of the specified bundle or null if it does not have an associated container.
getContainerTemplateDTO
(Bundle
The bundle defining a container. Must not be null and must be active.
bundle
)

Returns the ContainerTemplateDTO for the specified bundle

Method Detail

getContainerDTOsback to summary
public Collection<ContainerDTO> getContainerDTOs(Bundle... bundles)

Returns a collection of container description snapshots for a set of bundles.

Parameters
bundles:Bundle[]

The bundles who's container description snapshots are to be returned. Specifying no bundles, or the equivalent of an empty Bundle array, will return the container descriptions of all active bundles that define a container.

Returns:Collection<ContainerDTO>

A set of descriptions of the container of the specified bundles. Only bundles that have an associated container are included. If a bundle is listed multiple times in bundles only one ContainerDTO is returned. Returns an empty collection if no CDI containers are found.

getContainerTemplateDTOback to summary
public ContainerTemplateDTO getContainerTemplateDTO(Bundle bundle)

Returns the ContainerTemplateDTO for the specified bundle

Parameters
bundle:Bundle

The bundle defining a container. Must not be null and must be active.

Returns:ContainerTemplateDTO

The container template for of the specified bundle or null if it does not have an associated container.