Subsystem.State| Modifier and Type | Method and Description |
|---|---|
void |
addRequirements(java.util.Collection<org.osgi.resource.Requirement> requirements)
Adds the specified requirements to this subsystem's sharing policy.
|
AriesSubsystem |
install(java.lang.String location)
Installs a subsystem from the specified location identifier.
|
AriesSubsystem |
install(java.lang.String location,
org.apache.aries.util.filesystem.IDirectory content)
Installs a subsystem from the specified location identifier and content.
|
AriesSubsystem |
install(java.lang.String location,
org.apache.aries.util.filesystem.IDirectory content,
java.io.InputStream deploymentManifest)
Installs a subsystem from the specified location identifier and content
but uses the provided deployment manifest, if any, rather than the
computed one or the one provided as part of the content.
|
AriesSubsystem |
install(java.lang.String location,
java.io.InputStream content)
Installs a subsystem from the specified content.
|
AriesSubsystem |
install(java.lang.String location,
java.io.InputStream content,
java.io.InputStream deploymentManifest)
Installs a subsystem from the specified content according to the
specified deployment manifest.
|
getBundleContext, getChildren, getConstituents, getDeploymentHeaders, getLocation, getParents, getState, getSubsystemHeaders, getSubsystemId, getSymbolicName, getType, getVersion, start, stop, uninstallvoid addRequirements(java.util.Collection<org.osgi.resource.Requirement> requirements)
The sharing policy of this subsystem's region is updated with the specified requirements (i.e. imports). Requirements already part of the sharing policy are ignored. Upon return, constituents of this subsystem will be allowed to resolve against matching capabilities that are visible to the parent subsystems.
requirement - The requirement to add to the sharing policy.SubsystemException - If the requirement did not already exist and
could not be added.java.lang.UnsupportedOperationException - If this is the root subsystem or
the type does not support additional requirements.AriesSubsystem install(java.lang.String location)
Subsystem
This method performs the same function as calling
Subsystem.install(String, InputStream) with the specified location
identifier and null as the content.
install in interface Subsystemlocation - The location identifier of the subsystem to install.Subsystem.install(String, InputStream)AriesSubsystem install(java.lang.String location, java.io.InputStream content)
Subsystem
The specified location will be used as an identifier of the subsystem.
Every installed subsystem is uniquely identified by its location, which
is typically in the form of a URI. If the specified location conforms to
the subsystem-uri grammar, the required symbolic name and
optional version information will be used as default values.
If the specified content is null, a new input stream must be
created from which to read the subsystem by interpreting, in an
implementation dependent manner, the specified location.
A subsystem installation must be persistent. That is, an installed subsystem must remain installed across Framework and VM restarts.
All references to changing the state of this subsystem include both changing the state of the subsystem object as well as the state property of the subsystem service registration.
The following steps are required to install a subsystem.
INSTALLING and register
a new subsystem service.ResolverHook, disable runtime resolution
for the resources.INSTALLED.
Implementations should be sensitive to the potential for long running
operations and periodically check the current thread for interruption. An
interrupted thread should result in a SubsystemException with an
InterruptedException as the cause and be treated as an installation
failure.
All installation failure flows include the following, in order.
INSTALL_FAILED.UNINSTALLING.UNINSTALLED.SubsystemException with the cause of the installation
failure.install in interface Subsystemlocation - The location identifier of the subsystem to be installed.content - The input stream from which this subsystem will be read or
null to indicate the input stream must be created from the
specified location identifier. The input stream will always be
closed when this method completes, even if an exception is thrown.AriesSubsystem install(java.lang.String location, java.io.InputStream content, java.io.InputStream deploymentManifest)
Subsystem
This method installs a subsystem using the provided deployment manifest
instead of the one in the archive, if any, or a computed one. If the
deployment manifest is null, the behavior is exactly the same as
in the Subsystem.install(String, InputStream) method. Implementations must
support deployment manifest input streams in the format described by
section 134.2 of the Subsystem Service Specification. If the deployment
manifest does not conform to the subsystem manifest (see 134.15.2), the
installation fails.
install in interface Subsystemlocation - The location identifier of the subsystem to be installed.content - The input stream from which this subsystem will be read or
null to indicate the input stream must be created from the
specified location identifier. The input stream will always be
closed when this method completes, even if an exception is thrown.deploymentManifest - The deployment manifest to use in lieu of the
one in the archive, if any, or a computed one.AriesSubsystem install(java.lang.String location, org.apache.aries.util.filesystem.IDirectory content)
This method performs the same function as calling
install(String, IDirectory, InputStream) with a null deployment
manifest.
location - The location identifier of the subsystem to install.content - The directory from which this subsystem will be read or
null to indicate the directory must be created from the
specified location identifier.java.lang.IllegalStateException - If this subsystem's state is in
INSTALLING, INSTALL_FAILED, UNINSTALLING,
UNINSTALLED.SubsystemException - If the installation failed.java.lang.SecurityException - If the caller does not have the appropriate
SubsystemPermission[installed subsystem,LIFECYCLE], and
the runtime supports permissions.install(String, IDirectory, InputStream)AriesSubsystem install(java.lang.String location, org.apache.aries.util.filesystem.IDirectory content, java.io.InputStream deploymentManifest)
This method performs the same function as calling
install(String, InputStream, InputStream) except the content is
retrieved from the specified IDirectory instead.
location - The location identifier of the subsystem to install.content - The directory from which this subsystem will be read or
null to indicate the directory must be created from the
specified location identifier.deploymentManifest - The deployment manifest to use in lieu of any
others.java.lang.IllegalStateException - If this subsystem's state is in
INSTALLING, INSTALL_FAILED, UNINSTALLING,
UNINSTALLED.SubsystemException - If the installation failed.java.lang.SecurityException - If the caller does not have the appropriate
SubsystemPermission[installed subsystem,LIFECYCLE], and
the runtime supports permissions.install(String, InputStream, InputStream)Copyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.