@ProviderType public interface CDIComponentRuntime
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.
Modifier and Type | Method and Description |
---|---|
java.util.Collection<ContainerDTO> |
getContainerDTOs(Bundle... bundles)
Returns a collection of container description snapshots for a set of
bundles.
|
ContainerTemplateDTO |
getContainerTemplateDTO(Bundle bundle)
Returns the
ContainerTemplateDTO for the specified bundle |
java.util.Collection<ContainerDTO> getContainerDTOs(Bundle... bundles)
bundles
- 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
. 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.ContainerTemplateDTO getContainerTemplateDTO(Bundle bundle)
ContainerTemplateDTO
for the specified bundlebundle
- The bundle defining a container. Must not be null
and
must be active.null
if
it does not have an associated container.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0