01: /* JFox, the OpenSource J2EE Application Server
02: *
03: * Copyright (C) 2002 huihoo.org
04: * Distributable under GNU LGPL license
05: * See the GNU Lesser General Public License for more details.
06: */
07:
08: package javax.management;
09:
10: /**
11: * Represents runtime exceptions thrown in the agent when performing operations on MBeans.
12: * It wraps the actual <CODE>java.lang.RuntimeException</CODE> thrown.
13: *
14: * @author <a href="mailto:young_yy@hotmail.org">Young Yang</a>
15: */
16:
17: public class RuntimeOperationsException extends JMRuntimeException {
18:
19: /**
20: * The encapsulated RuntimeException
21: */
22: private java.lang.RuntimeException runtimeException;
23:
24: /**
25: * Creates a <CODE>RuntimeOperationsException</CODE> that wraps the actual <CODE>java.lang.RuntimeException</CODE>.
26: *
27: */
28: public RuntimeOperationsException(java.lang.RuntimeException e) {
29: super ();
30: runtimeException = e;
31: }
32:
33: /**
34: * Creates a <CODE>RuntimeOperationsException</CODE> that wraps the actual <CODE>java.lang.RuntimeException</CODE>
35: * with a detailed message.
36: */
37: public RuntimeOperationsException(java.lang.RuntimeException e,
38: String message) {
39: super (message);
40: runtimeException = e;
41: }
42:
43: /**
44: * Returns the actual <CODE>java.lang.RuntimeException</CODE> thrown.
45: */
46: public java.lang.RuntimeException getTargetException() {
47: return runtimeException;
48: }
49:
50: }
|