KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > management > RuntimeOperationsException


1 /*
2  * @(#)RuntimeOperationsException.java 4.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.management;
9
10
11
12 /**
13  * Represents runtime exceptions thrown in the agent when performing operations on MBeans.
14  * It wraps the actual <CODE>java.lang.RuntimeException</CODE> thrown.
15  *
16  * @since 1.5
17  */

18 public class RuntimeOperationsException extends JMRuntimeException JavaDoc {
19
20     /* Serial version */
21     private static final long serialVersionUID = -8408923047489133588L;
22
23     /**
24      * @serial The encapsulated {@link RuntimeException}
25      */

26     private java.lang.RuntimeException JavaDoc runtimeException ;
27
28
29     /**
30      * Creates a <CODE>RuntimeOperationsException</CODE> that wraps the actual <CODE>java.lang.RuntimeException</CODE>.
31      *
32      * @param e the wrapped exception.
33      */

34     public RuntimeOperationsException(java.lang.RuntimeException JavaDoc e) {
35     super() ;
36     runtimeException = e ;
37     }
38    
39     /**
40      * Creates a <CODE>RuntimeOperationsException</CODE> that wraps the actual <CODE>java.lang.RuntimeException</CODE>
41      * with a detailed message.
42      *
43      * @param e the wrapped exception.
44      * @param message the detail message.
45      */

46     public RuntimeOperationsException(java.lang.RuntimeException JavaDoc e, String JavaDoc message) {
47     super(message);
48     runtimeException = e ;
49     }
50     
51     /**
52      * Returns the actual {@link RuntimeException} thrown.
53      *
54      * @return the wrapped {@link RuntimeException}.
55      */

56     public java.lang.RuntimeException JavaDoc getTargetException() {
57     return runtimeException ;
58     }
59     
60     /**
61      * Returns the actual {@link RuntimeException} thrown.
62      *
63      * @return the wrapped {@link RuntimeException}.
64      */

65     public Throwable JavaDoc getCause() {
66     return runtimeException;
67     }
68 }
69
Popular Tags