org.osgi.service.resolver
Class ResolutionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.osgi.service.resolver.ResolutionException
All Implemented Interfaces:
java.io.Serializable

public class ResolutionException
extends java.lang.RuntimeException

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 subclass this class to provide extra state information about the reason for the resolution failure.

See Also:
Serialized Form

Constructor Summary
ResolutionException(java.lang.String message)
          Creates an exception of type ResolutionException.
ResolutionException(java.lang.String message, java.lang.Throwable cause, java.util.Collection<Requirement> unresolvedRequirements)
          Creates an exception of type ResolutionException.
ResolutionException(java.lang.Throwable cause)
          Creates an exception of type ResolutionException.
 
Method Summary
 java.util.Collection<Requirement> getUnresolvedRequirements()
          May contain one or more unresolved mandatory requirements from mandatory resources.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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(java.lang.String message,
                           java.lang.Throwable cause,
                           java.util.Collection<Requirement> unresolvedRequirements)
Creates an exception of type ResolutionException.

This method creates an ResolutionException object with the specified message, cause and unresolvedRequirements.

Parameters:
message - The message.
cause - The cause of this exception.
unresolvedRequirements - the requirements that are unresolved or null if no unresolved requirements information is provided.

ResolutionException

public ResolutionException(java.lang.String message)
Creates an exception of type ResolutionException.

This method creates an ResolutionException object with the specified message.

Parameters:
message - The message.

ResolutionException

public ResolutionException(java.lang.Throwable cause)
Creates an exception of type ResolutionException.

This method creates an ResolutionException object with the specified cause.

Parameters:
cause - The cause of this exception.
Method Detail

getUnresolvedRequirements

public java.util.Collection<Requirement> getUnresolvedRequirements()
May contain one or more unresolved mandatory requirements from mandatory resources.

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

Returns:
a collection of requirements that are unsatisfied


Copyright © 2006-2012 The Apache Software Foundation. All Rights Reserved.