public final class OsgiPluginUtil extends Object
| Constructor and Description |
|---|
OsgiPluginUtil() |
| Modifier and Type | Method and Description |
|---|---|
static ContainerAccessor |
createNonExistingPluginContainer(String pluginKey)
Creates null implementation of ContainerAccessor interface
|
static PluginDependencies |
getDependencies(org.osgi.framework.Bundle bundle)
Determines which plugin keys are dependencies based on tracing the wires, categorising them as mandatory,
optional or dynamic.
|
public static ContainerAccessor createNonExistingPluginContainer(String pluginKey)
That implementation used when plugin doesn't export access to any internal IoC. In that case a try to access container means some logical bug in the design, for example reference some instance ID in module type definition, so it makes sense to fail fast with reasonable explanation rather then return some empty state which will masks real problem.
pluginKey - plugin identifier to be written in container exceptionspublic static PluginDependencies getDependencies(org.osgi.framework.Bundle bundle)
Bundle must be in RESOLVED state at least. If Bundle is in INSTALLED or UNINSTALLED states wires are
not existing and method returns empty dependencies set
Namespace.RESOLUTION_OPTIONAL and PackageNamespace.RESOLUTION_DYNAMIC are mapped to
optional and dynamic, respectively. Any others are mapped to mandatory.
Copyright © 2019 Atlassian. All rights reserved.