001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.activemq.ra;
018    
019    /**
020     * Thrown to indicate that a MessageEndpoint is no longer valid
021     * and should be discarded. 
022     *  
023     * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>
024     */
025    public class InvalidMessageEndpointException extends RuntimeException {
026    
027        private static final long serialVersionUID = -9007051892399939057L;
028    
029        /**
030         * Constructs a new exception with <code>null</code> as its detail message.
031         * The cause is not initialized, and may subsequently be initialized by a
032         * call to {@link #initCause}.
033         */
034        public InvalidMessageEndpointException() {
035            super();
036        }
037    
038        /**
039         * Constructs a new exception with the specified detail message.  The
040         * cause is not initialized, and may subsequently be initialized by
041         * a call to {@link #initCause}.
042         *
043         * @param message the detail message. The detail message is saved for
044         *                later retrieval by the {@link #getMessage()} method.
045         */
046        public InvalidMessageEndpointException(final String message) {
047            super(message);
048        }
049    
050        /**
051         * Constructs a new exception with the specified detail message and
052         * cause.  <p>Note that the detail message associated with
053         * <code>cause</code> is <i>not</i> automatically incorporated in
054         * this exception's detail message.
055         *
056         * @param message the detail message (which is saved for later retrieval
057         *                by the {@link #getMessage()} method).
058         * @param cause   the cause (which is saved for later retrieval by the
059         *                {@link #getCause()} method).  (A <tt>null</tt> value is
060         *                permitted, and indicates that the cause is nonexistent or
061         *                unknown.)
062         */
063        public InvalidMessageEndpointException(final String message, final Throwable cause) {
064            super(message, cause);
065        }
066    
067        /**
068         * Constructs a new exception with the specified cause and a detail
069         * message of <tt>(cause==null ? null : cause.toString())</tt> (which
070         * typically contains the class and detail message of <tt>cause</tt>).
071         * This constructor is useful for exceptions that are little more than
072         * wrappers for other throwables (for example, {@link
073         * java.security.PrivilegedActionException}).
074         *
075         * @param cause the cause (which is saved for later retrieval by the
076         *              {@link #getCause()} method).  (A <tt>null</tt> value is
077         *              permitted, and indicates that the cause is nonexistent or
078         *              unknown.)
079         */
080        public InvalidMessageEndpointException(final Throwable cause) {
081            super(cause);
082        }
083    }