KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > snmp > daemon > CommunicationException


1 /*
2  * @(#)file CommunicationException.java
3  * @(#)author Sun Microsystems, Inc.
4  * @(#)version 1.19
5  * @(#)lastedit 03/12/19
6  *
7  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
9  *
10  */

11
12 package com.sun.jmx.snmp.daemon;
13
14 // java import
15
//
16
import java.io.PrintStream JavaDoc;
17 import java.io.PrintWriter JavaDoc;
18
19 /**
20  * Represents exceptions raised due to communications problems,
21  * for example when a managed object server is out of reach.<p>
22  *
23  * <p><b>This API is a Sun Microsystems internal API and is subject
24  * to change without notice.</b></p>
25  * @version 1.19 12/19/03
26  * @author Sun Microsystems, Inc
27  */

28
29 public class CommunicationException extends javax.management.JMRuntimeException JavaDoc {
30
31     /* Serial version */
32     private static final long serialVersionUID = -2499186113233316177L;
33
34     /**
35      * Constructs a CommunicationException with a target exception.
36      */

37     public CommunicationException(Throwable JavaDoc target) {
38     super(target.getMessage());
39     initCause(target);
40     }
41
42     /**
43      * Constructs a CommunicationException with a target exception
44      * and a detail message.
45      */

46     public CommunicationException(Throwable JavaDoc target, String JavaDoc msg) {
47     super(msg);
48     initCause(target);
49     }
50
51     /**
52      * Constructs a CommunicationException with a detail message.
53      */

54     public CommunicationException(String JavaDoc msg) {
55     super(msg);
56     }
57
58     /**
59      * Get the thrown target exception.
60      */

61     public Throwable JavaDoc getTargetException() {
62     return getCause();
63     }
64
65 }
66
Popular Tags