Interface Resolver

  • All Known Implementing Classes:
    ResolverImpl

    public interface Resolver
    • Method Detail

      • add

        void add​(Resource resource)
        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

        void add​(Requirement requirement)
        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

        void addGlobalCapability​(Capability capability)
        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

        boolean resolve()
                 throws InterruptedResolutionException
        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 else false
        Throws:
        InterruptedResolutionException - if the resolution has been interrupted
      • resolve

        boolean resolve​(int flags)
                 throws InterruptedResolutionException
        Start the resolution process with the following flags.
        Parameters:
        flags - resolution flags
        Returns:
        true if the resolution has succeeded else false
        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

        Reason[] getReason​(Resource resource)
        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)