Interface Resolver
- All Known Implementing Classes:
ResolverImpl
public interface Resolver
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Requirement requirement) Add the following requirement to the resolution The current resolution will be lost after adding a requirement.void
Add the following resource to the resolution.void
addGlobalCapability
(Capability capability) Add a global capability.void
deploy
(int flags) Returns the list of requirements that have been added to the resolutionResource[]
Returns the list of resources that have been added to the resolutionReturns the list of global capabilitiesResource[]
List of optional resources that may be installedReason[]
List of reasons why a resource has been included either as a mandatory or optional resource during the resolution.Resource[]
List of mandatory resources that need to be installedReason[]
List of requirements that could not be satisfied during the resolutionboolean
resolve()
Start the resolution process and return whether the constraints have been successfully met or not.boolean
resolve
(int flags) Start the resolution process with the following flags.
-
Field Details
-
NO_OPTIONAL_RESOURCES
static final int NO_OPTIONAL_RESOURCES- See Also:
-
NO_LOCAL_RESOURCES
static final int NO_LOCAL_RESOURCES- See Also:
-
NO_SYSTEM_BUNDLE
static final int NO_SYSTEM_BUNDLE- See Also:
-
DO_NOT_PREFER_LOCAL
static final int DO_NOT_PREFER_LOCAL- See Also:
-
START
static final int START- See Also:
-
-
Method Details
-
add
Add the following resource to the resolution. The resource will be part of the output and all its requirements will be satisfied. It has the same effect has adding a requirement that will match this resource by symbolicname and version. The current resolution will be lost after adding a resource.- Parameters:
resource
- the resource to add
-
getAddedResources
Resource[] getAddedResources()Returns the list of resources that have been added to the resolution- Returns:
-
add
Add the following requirement to the resolution The current resolution will be lost after adding a requirement.- Parameters:
requirement
- the requirement to add
-
getAddedRequirements
Requirement[] getAddedRequirements()Returns the list of requirements that have been added to the resolution- Returns:
-
addGlobalCapability
Add a global capability. A global capability is one capability provided by the environment but not reflected in local resources.- Parameters:
capability
- the new global capability
-
getGlobalCapabilities
Capability[] getGlobalCapabilities()Returns the list of global capabilities- Returns:
-
resolve
Start the resolution process and return whether the constraints have been successfully met or not. The resolution can be interrupted by a call to Thread.interrupt() at any time. The result will be to stop the resolver and throw an InterruptedException.- Returns:
true
if the resolution has succeeded elsefalse
- Throws:
InterruptedResolutionException
- if the resolution has been interrupted
-
resolve
Start the resolution process with the following flags.- Parameters:
flags
- resolution flags- Returns:
true
if the resolution has succeeded elsefalse
- Throws:
InterruptedResolutionException
- if the resolution has been interrupted
-
getRequiredResources
Resource[] getRequiredResources()List of mandatory resources that need to be installed- Returns:
-
getOptionalResources
Resource[] getOptionalResources()List of optional resources that may be installed- Returns:
-
getReason
List of reasons why a resource has been included either as a mandatory or optional resource during the resolution.- Parameters:
resource
-- Returns:
- an array of Reason
-
getUnsatisfiedRequirements
Reason[] getUnsatisfiedRequirements()List of requirements that could not be satisfied during the resolution- Returns:
-
deploy
void deploy(int flags)
-