Home » xml-commons-external-1.4.01-src » javax » xml » messaging » [javadoc | source]

    1   /*
    2    * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    3    *
    4    * Copyright 2000-2007 Sun Microsystems, Inc. All rights reserved. 
    5    *
    6    * The contents of this file are subject to the terms of either the GNU
    7    * General Public License Version 2 only ("GPL") or the Common Development
    8    * and Distribution License ("CDDL") (collectively, the "License").  You may
    9    * not use this file except in compliance with the License.  You can obtain
   10    * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
   11    * or mq/legal/LICENSE.txt.  See the License for the specific language
   12    * governing permissions and limitations under the License.
   13    * 
   14    * When distributing the software, include this License Header Notice in each
   15    * file and include the License file at mq/legal/LICENSE.txt.  Sun designates
   16    * this particular file as subject to the "Classpath" exception as provided by
   17    * Sun in the GPL Version 2 section of the License file that accompanied this
   18    * code.  If applicable, add the following below the License Header, with the
   19    * fields enclosed by brackets [] replaced by your own identifying information:
   20    * "Portions Copyrighted [year] [name of copyright owner]"
   21    * 
   22    * Contributor(s):
   23    * 
   24    * If you wish your version of this file to be governed by only the CDDL or
   25    * only the GPL Version 2, indicate your decision by adding "[Contributor]
   26    * elects to include this software in this distribution under the [CDDL or GPL
   27    * Version 2] license."  If you don't indicate a single choice of license, a
   28    * recipient has the option to distribute your version of this file under
   29    * either the CDDL, the GPL Version 2 or  to extend the choice of license to
   30    * its licensees as provided above.  However, if you add GPL Version 2 code
   31    * and therefore, elected the GPL Version 2 license, then the option applies
   32    * only if the new code is made subject to such option by the copyright holder. 
   33    */
   34   
   35   /*
   36    * @(#)JAXMException.java	1.3 07/02/07
   37    */ 
   38   
   39   package javax.xml.messaging;
   40   
   41   import javax.xml.soap;
   42   
   43   /**
   44    * An exception that signals that a JAXM exception has occurred. A
   45    * <code>JAXMException</code> object may contain a <code>String</code>
   46    * that gives the reason for the exception, an embedded
   47    * <code>Throwable</code> object, or both. This class provides methods
   48    * for retrieving reason messages and for retrieving the embedded
   49    * <code>Throwable</code> object.
   50    *
   51    * <P> Typical reasons for throwing a <code>JAXMException</code>
   52    * object are problems such as not being able to send a message and
   53    * not being able to get a connection with the provider.  Reasons for
   54    * embedding a <code>Throwable</code> object include problems such as
   55    * an input/output errors or a parsing problem, such as an error
   56    * parsing a header.
   57    */
   58   public class JAXMException extends SOAPException {
   59   
   60       private Throwable cause;
   61   
   62       /**
   63        * Constructs a <code>JAXMException</code> object with no
   64        * reason or embedded <code>Throwable</code> object.
   65        */
   66       public JAXMException() {
   67           super();
   68       }
   69   
   70       /**
   71        * Constructs a <code>JAXMException</code> object with the given
   72        * <code>String</code> as the reason for the exception being thrown.
   73        *
   74        * @param reason a <code>String</code> giving a description of what 
   75        *        caused this exception
   76        */
   77       public JAXMException(String reason) {
   78           super(reason);
   79       }
   80   
   81       /**
   82        * Constructs a <code>JAXMException</code> object with the given
   83        * <code>String</code> as the reason for the exception being thrown
   84        * and the given <code>Throwable</code> object as an embedded
   85        * exception.
   86        *
   87        * @param reason a <code>String</code> giving a description of what 
   88        *        caused this exception
   89        * @param cause a <code>Throwable</code> object that is to
   90        *        be embedded in this <code>JAXMException</code> object
   91        */
   92       public JAXMException(String reason, Throwable cause) {
   93          super (reason, cause);
   94       }
   95   
   96       /**
   97        * Constructs a <code>JAXMException</code> object initialized
   98        * with the given <code>Throwable</code> object.
   99        *
  100        * @param cause a <code>Throwable</code> object that is to
  101        *        be embedded in this <code>JAXMException</code> object
  102        */
  103       public JAXMException(Throwable cause) {
  104   	super(cause);
  105       }
  106   }

Home » xml-commons-external-1.4.01-src » javax » xml » messaging » [javadoc | source]