org.osgi.service.resolver

## Class ResolutionException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.osgi.service.resolver.ResolutionException

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  ReasonException

    public class ResolutionException
    extends Exception

Indicates failure to resolve a set of requirements.

If a resolution failure is caused by a missing mandatory dependency a resolver may include any requirements it has considered in the resolution exception. Clients may access this set of dependencies via the `getUnresolvedRequirements()` method.

Resolver implementations may extend this class to provide extra state information about the reason for the resolution failure.

Author:
  $Id: 2bcc0ac8ebfaf169dd301493303d23ce613ac8b9 $
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ResolutionException(String message)` Create a `ResolutionException` with the specified message.
`ResolutionException(String message, Throwable cause, Collection<org.osgi.resource.Requirement> unresolvedRequirements)` Create a `ResolutionException` with the specified message, cause and unresolved requirements.
`ResolutionException(Throwable cause)` Create a `ResolutionException` with the specified cause.

### Method Summary

All Methods Instance Methods Concrete Methods
`Collection<org.osgi.resource.Requirement>` `getUnresolvedRequirements()` Return the unresolved requirements, if any, for this exception.

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ResolutionException

    public ResolutionException(String message,
                               Throwable cause,
                               Collection<org.osgi.resource.Requirement> unresolvedRequirements)

Create a `ResolutionException` with the specified message, cause and unresolved requirements.

Parameters:
  `message` - The message.
  `cause` - The cause of this exception.
  `unresolvedRequirements` - The unresolved mandatory requirements from mandatory resources or `null` if no unresolved requirements information is provided.

#### ResolutionException

    public ResolutionException(String message)

Create a `ResolutionException` with the specified message.

Parameters:
  `message` - The message.

#### ResolutionException

    public ResolutionException(Throwable cause)

Create a `ResolutionException` with the specified cause.

Parameters:
  `cause` - The cause of this exception.

### Method Detail

#### getUnresolvedRequirements

    public Collection<org.osgi.resource.Requirement> getUnresolvedRequirements()

Return the unresolved requirements, if any, for this exception.

The unresolved requirements are provided for informational purposes and the specific set of unresolved requirements that are provided after a resolve failure is not defined.

Returns:
  A collection of the unresolved requirements for this exception. The returned collection may be empty if no unresolved requirements information is available.