@ProviderType
public interface OsgiInstaller
InstallableResource
in an OSGi framework.
The resources are provided by provider components which are
clients of this API. For example a file directory provider might
scan a directory in the file system and provide the artifacts
contained in the configured directory.
When such a client starts it should first call
registerResources(String, InstallableResource[])
and
inform this service about all available resources. In the case
of a file directory provider, this list would contain all
files found in the directory (and sub directories). This is
the rendezvous point. The OSGi installer service compares this
complete list with previous lists it might have and triggers
corresponding tasks like installing new artifacts and
uninstalling removed artifacts.
Once this rendezvous has been done between a client and the
OSGi installe, the client calls
updateResources(String, InstallableResource[], String[])
to inform about changes like new resources or removed resources.
A single provider should never call these methods in parallel,
before calling any method a previous call must have finished!
The OSGi installer detects the resources and based on their type
and metadata, the installer decides whether to install them,
update an already installed artifact or simply ignore them.
For example, for bundles the symbolic name and the version is used.Modifier and Type | Method and Description |
---|---|
void |
registerResources(String urlScheme,
InstallableResource[] resources)
Provide the installer with the complete list of installable
resources for a given client.
|
void |
updateResources(String urlScheme,
InstallableResource[] resources,
String[] ids)
Inform the installer that resources are available for installation
and/or other resources are no longer available.
|
void registerResources(String urlScheme, InstallableResource[] resources)
urlScheme
- identifies the client.resources
- the list of available resourcesvoid updateResources(String urlScheme, InstallableResource[] resources, String[] ids)
urlScheme
- identifies the client.resources
- An array of updated/new resources - might be nullids
- An array of identifiers for removed resources - might be nullCopyright © 2017 The Apache Software Foundation. All rights reserved.