View Javadoc

1   /*******************************************************************************
2    * Copyright (c) 2007, 2014 Massimiliano Ziccardi
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   *******************************************************************************/
16  package it.jnrpe.client;
17  
18  /**
19   * Throws in case of JNRPE client communication exceptions.
20   *
21   * @author Massimiliano Ziccardi
22   *
23   */
24  public class JNRPEClientException extends Exception {
25  
26      /**
27       *
28       */
29      private static final long serialVersionUID = -8959007568481323772L;
30  
31      /**
32       * Constructs a new exception with <code>null</code> as its detail message.
33       * The cause is not initialized, and may subsequently be initialized by a
34       * call to {@link #initCause}.
35       */
36      public JNRPEClientException() {
37          super();
38      }
39  
40      /**
41       * Constructs a new exception with the specified detail message and
42       * cause.  <p>Note that the detail message associated with
43       * <code>cause</code> is <i>not</i> automatically incorporated in
44       * this exception's detail message.
45       *
46       * @param  message the detail message (which is saved for later retrieval
47       *         by the {@link #getMessage()} method).
48       * @param  cause the cause (which is saved for later retrieval by the
49       *         {@link #getCause()} method).  (A <tt>null</tt> value is
50       *         permitted, and indicates that the cause is nonexistent or
51       *         unknown.)
52       */
53      public JNRPEClientException(final String message, final Throwable cause) {
54          super(message, cause);
55      }
56  
57      /**
58       * Constructs a new exception with the specified detail message.  The
59       * cause is not initialized, and may subsequently be initialized by
60       * a call to {@link #initCause}.
61       *
62       * @param   message   the detail message. The detail message is saved for
63       *          later retrieval by the {@link #getMessage()} method.
64       */
65      public JNRPEClientException(final String message) {
66          super(message);
67      }
68  
69      /**
70       * Constructs a new exception with the specified cause and a detail
71       * message of <tt>(cause==null ? null : cause.toString())</tt> (which
72       * typically contains the class and detail message of <tt>cause</tt>).
73       * This constructor is useful for exceptions that are little more than
74       * wrappers for other throwables (for example, {@link
75       * java.security.PrivilegedActionException}).
76       *
77       * @param  cause the cause (which is saved for later retrieval by the
78       *         {@link #getCause()} method).  (A <tt>null</tt> value is
79       *         permitted, and indicates that the cause is nonexistent or
80       *         unknown.)
81       */
82      public JNRPEClientException(final Throwable cause) {
83          super(cause);
84      }
85  
86  }