|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AriesSubsystem
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.osgi.service.subsystem.Subsystem |
---|
Subsystem.State |
Method Summary | |
---|---|
void |
addRequirements(Collection<org.osgi.resource.Requirement> requirements)
Adds the specified requirements to this subsystem's sharing policy. |
AriesSubsystem |
install(String location)
Installs a subsystem from the specified location identifier. |
AriesSubsystem |
install(String location,
org.apache.aries.util.filesystem.IDirectory content)
Installs a subsystem from the specified location identifier and content. |
AriesSubsystem |
install(String location,
InputStream content)
Installs a subsystem from the specified content. |
Methods inherited from interface org.osgi.service.subsystem.Subsystem |
---|
getBundleContext, getChildren, getConstituents, getLocation, getParents, getState, getSubsystemHeaders, getSubsystemId, getSymbolicName, getType, getVersion, start, stop, uninstall |
Method Detail |
---|
void addRequirements(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.
UnsupportedOperationException
- If this is the root subsystem or
the type does not support additional requirements.AriesSubsystem install(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 Subsystem
location
- The location identifier of the subsystem to install.
Subsystem.install(String, InputStream)
AriesSubsystem install(String location, 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 Subsystem
location
- 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(String location, org.apache.aries.util.filesystem.IDirectory content)
This method performs the same function as calling
install(String, 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.
IllegalStateException
- If this subsystem's state is in
INSTALLING
, INSTALL_FAILED
, UNINSTALLING
,
UNINSTALLED
.
SubsystemException
- If the installation failed.
SecurityException
- If the caller does not have the appropriate
SubsystemPermission
[installed subsystem,LIFECYCLE], and
the runtime supports permissions.install(String, InputStream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |