View Javadoc
1   /*
2    * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
3    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4    *
5    * This code is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU General Public License version 2 only, as
7    * published by the Free Software Foundation.  Oracle designates this
8    * particular file as subject to the "Classpath" exception as provided
9    * by Oracle in the LICENSE file that accompanied this code.
10   *
11   * This code is distributed in the hope that it will be useful, but WITHOUT
12   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14   * version 2 for more details (a copy is included in the LICENSE file that
15   * accompanied this code).
16   *
17   * You should have received a copy of the GNU General Public License version
18   * 2 along with this work; if not, write to the Free Software Foundation,
19   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20   *
21   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22   * or visit www.oracle.com if you need additional information or have any
23   * questions.
24   */
25  
26  package javax.xml.ws;
27  
28  /** The <code>ProtocolException</code> class is a
29   *  base class for exceptions related to a specific protocol binding. Subclasses
30   *  are used to communicate protocol level fault information to clients and may
31   *  be used on the server to control the protocol specific fault representation.
32   *
33   *  @since JAX-WS 2.0
34  **/
35  public class ProtocolException extends WebServiceException {
36      /**
37       * Constructs a new protocol exception with <code>null</code> as its detail message. The
38       * cause is not initialized, and may subsequently be initialized by a call
39       * to <code>Throwable.initCause(java.lang.Throwable)</code>.
40       */
41      public ProtocolException() {
42          super();
43      }
44  
45      /**
46       * Constructs a new protocol exception with the specified detail message.
47       * The cause is not initialized, and may subsequently be initialized by a
48       * call to <code>Throwable.initCause(java.lang.Throwable)</code>.
49       *
50       * @param message the detail message. The detail message is saved for later
51       *   retrieval by the Throwable.getMessage() method.
52       */
53      public ProtocolException(String message) {
54          super(message);
55      }
56  
57      /**
58       * Constructs a new runtime exception with the specified detail message and
59       * cause.
60       *
61       * Note that the detail message associated with  cause is not automatically
62       * incorporated in  this runtime exception's detail message.
63       *
64       * @param message the detail message (which is saved for later retrieval  by
65       *   the Throwable.getMessage() method).
66       * @param cause the cause (which is saved for later retrieval by the
67       * <code>Throwable.getCause()</code> method). (A <code>null</code> value is  permitted, and indicates
68       * that the cause is nonexistent or  unknown.)
69       */
70      public ProtocolException(String message,  Throwable cause) {
71          super(message, cause);
72      }
73  
74      /**
75       * Constructs a new runtime exception with the specified cause and a  detail
76       * message of <code>(cause==null ? null : cause.toString())</code>  (which typically
77       * contains the class and detail message of  cause). This constructor is
78       * useful for runtime exceptions  that are little more than wrappers for
79       * other throwables.
80       *
81       * @param cause the cause (which is saved for later retrieval by the
82       * <code>Throwable.getCause()</code> method). (A <code>null</code> value is  permitted, and indicates
83       * that the cause is nonexistent or  unknown.)
84       */
85      public ProtocolException(Throwable cause) {
86          super(cause);
87      }
88  }