javax.management
Class MBeanException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.management.JMException (src) 
              extended byjavax.management.MBeanException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MBeanRegistrationException (src)

public class MBeanException
extends JMException (src)

A wrapper for exceptions thrown by MBeans.

See Also:
Serialized Form

Constructor Summary
MBeanException(java.lang.Exception exception)
          Construct a new MBeanException from a given exception.
MBeanException(java.lang.Exception exception, java.lang.String message)
          Construct a new MBeanException from a given exception and message.
 
Method Summary
 java.lang.Throwable getCause()
          Retrieves the wrapped exception.
 java.lang.Exception getTargetException()
          Retrieves the wrapped exception.
 java.lang.String toString()
          Returns a string representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MBeanException

public MBeanException(java.lang.Exception exception)
Construct a new MBeanException from a given exception.

Parameters:
exception - the exception to wrap.

MBeanException

public MBeanException(java.lang.Exception exception,
                      java.lang.String message)
Construct a new MBeanException from a given exception and message.

Parameters:
message - the specified message.
Method Detail

getTargetException

public java.lang.Exception getTargetException()
Retrieves the wrapped exception.

Returns:
the wrapped exception.

getCause

public java.lang.Throwable getCause()
Retrieves the wrapped exception.

Returns:
the wrapped exception.

toString

public java.lang.String toString()
Returns a string representation of this exception. The returned string contains this exception name, message and a string representation of the target exception if it has been set.

Returns:
string representation of this exception