javax.management

Class RuntimeMBeanException

public class RuntimeMBeanException extends JMRuntimeException

Represents an arbitrary runtime exception thrown by a management bean. When a management bean executes code that causes a runtime exception to be thrown, the resulting exception is wrapped inside a {@link RuntimeMBeanException}. Calling {@link getTargetException()} will return the wrapped exception.

Since: 1.5

Constructor Summary
RuntimeMBeanException(RuntimeException e)
Constructs a new RuntimeMBeanException wrapping the specified exception.
RuntimeMBeanException(RuntimeException e, String message)
Constructs a new RuntimeMBeanException wrapping the specified exception and using the supplied message.
Method Summary
ThrowablegetCause()
Returns the true cause of this exception, the wrapped runtime exception.
RuntimeExceptiongetTargetException()
Returns the true cause of this exception, the wrapped runtime exception.

Constructor Detail

RuntimeMBeanException

public RuntimeMBeanException(RuntimeException e)
Constructs a new RuntimeMBeanException wrapping the specified exception.

Parameters: e the exception to be wrapped.

RuntimeMBeanException

public RuntimeMBeanException(RuntimeException e, String message)
Constructs a new RuntimeMBeanException wrapping the specified exception and using the supplied message.

Parameters: e the exception to be wrapped. message the error message to give to the user.

Method Detail

getCause

public Throwable getCause()
Returns the true cause of this exception, the wrapped runtime exception.

Returns: the wrapped exception.

getTargetException

public RuntimeException getTargetException()
Returns the true cause of this exception, the wrapped runtime exception.

Returns: the wrapped exception.