Package org.osgi.service.resolver
Class ResolutionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.osgi.service.resolver.ResolutionException
-
- All Implemented Interfaces:
java.io.Serializable
public class ResolutionException extends java.lang.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.
- Version:
- $Id: 42e5773e3b7e240673874329e5d9e705d0b698c5 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
private java.util.Collection<org.osgi.resource.Requirement>
unresolvedRequirements
-
Constructor Summary
Constructors Constructor Description ResolutionException(java.lang.String message)
Create aResolutionException
with the specified message.ResolutionException(java.lang.String message, java.lang.Throwable cause, java.util.Collection<org.osgi.resource.Requirement> unresolvedRequirements)
Create aResolutionException
with the specified message, cause and unresolved requirements.ResolutionException(java.lang.Throwable cause)
Create aResolutionException
with the specified cause.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> java.util.Collection<T>
emptyCollection()
java.util.Collection<org.osgi.resource.Requirement>
getUnresolvedRequirements()
Return the unresolved requirements, if any, for this exception.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
unresolvedRequirements
private final java.util.Collection<org.osgi.resource.Requirement> unresolvedRequirements
-
-
Constructor Detail
-
ResolutionException
public ResolutionException(java.lang.String message, java.lang.Throwable cause, java.util.Collection<org.osgi.resource.Requirement> unresolvedRequirements)
Create aResolutionException
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 ornull
if no unresolved requirements information is provided.
-
ResolutionException
public ResolutionException(java.lang.String message)
Create aResolutionException
with the specified message.- Parameters:
message
- The message.
-
ResolutionException
public ResolutionException(java.lang.Throwable cause)
Create aResolutionException
with the specified cause.- Parameters:
cause
- The cause of this exception.
-
-
Method Detail
-
emptyCollection
private static <T> java.util.Collection<T> emptyCollection()
-
getUnresolvedRequirements
public java.util.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 provided.
-
-