org.osgi.service.component
Class ComponentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.osgi.service.component.ComponentException
All Implemented Interfaces:
Serializable

public class ComponentException
extends RuntimeException

Unchecked exception which may be thrown by the Service Component Runtime.

Version:
$Revision: 6083 $
See Also:
Serialized Form

Constructor Summary
ComponentException(String message)
          Construct a new ComponentException with the specified message.
ComponentException(String message, Throwable cause)
          Construct a new ComponentException with the specified message and cause.
ComponentException(Throwable cause)
          Construct a new ComponentException with the specified cause.
 
Method Summary
 Throwable getCause()
          Returns the cause of this exception or null if no cause was set.
 Throwable initCause(Throwable cause)
          Initializes the cause of this exception to the specified value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComponentException

public ComponentException(String message,
                          Throwable cause)
Construct a new ComponentException with the specified message and cause.

Parameters:
message - The message for the exception.
cause - The cause of the exception. May be null.

ComponentException

public ComponentException(String message)
Construct a new ComponentException with the specified message.

Parameters:
message - The message for the exception.

ComponentException

public ComponentException(Throwable cause)
Construct a new ComponentException with the specified cause.

Parameters:
cause - The cause of the exception. May be null.
Method Detail

getCause

public Throwable getCause()
Returns the cause of this exception or null if no cause was set.

Returns:
The cause of this exception or null if no cause was set.

initCause

public Throwable initCause(Throwable cause)
Initializes the cause of this exception to the specified value.

Parameters:
cause - The cause of this exception.
Returns:
This exception.
Throws:
IllegalArgumentException - If the specified cause is this exception.
IllegalStateException - If the cause of this exception has already been set.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.