001    /** 
002     * 
003     * Copyright 2004 Michael Gaffney
004     * 
005     * Licensed under the Apache License, Version 2.0 (the "License"); 
006     * you may not use this file except in compliance with the License. 
007     * 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     **/
018    package org.activemq.ra;
019    
020    /**
021     * Thrown to indicate that a MessageEndpoint is no longer valid
022     * and should be discarded. 
023     *  
024     * @author <a href="mailto:michael.gaffney@panacya.com">Michael Gaffney </a>
025     */
026    public class InvalidMessageEndpointException extends RuntimeException {
027    
028        /**
029         * Constructs a new exception with <code>null</code> as its detail message.
030         * The cause is not initialized, and may subsequently be initialized by a
031         * call to {@link #initCause}.
032         */
033        public InvalidMessageEndpointException() {
034            super();
035        }
036    
037        /**
038         * Constructs a new exception with the specified detail message.  The
039         * cause is not initialized, and may subsequently be initialized by
040         * a call to {@link #initCause}.
041         *
042         * @param message the detail message. The detail message is saved for
043         *                later retrieval by the {@link #getMessage()} method.
044         */
045        public InvalidMessageEndpointException(final String message) {
046            super(message);
047        }
048    
049        /**
050         * Constructs a new exception with the specified detail message and
051         * cause.  <p>Note that the detail message associated with
052         * <code>cause</code> is <i>not</i> automatically incorporated in
053         * this exception's detail message.
054         *
055         * @param message the detail message (which is saved for later retrieval
056         *                by the {@link #getMessage()} method).
057         * @param cause   the cause (which is saved for later retrieval by the
058         *                {@link #getCause()} method).  (A <tt>null</tt> value is
059         *                permitted, and indicates that the cause is nonexistent or
060         *                unknown.)
061         */
062        public InvalidMessageEndpointException(final String message, final Throwable cause) {
063            super(message, cause);
064        }
065    
066        /**
067         * Constructs a new exception with the specified cause and a detail
068         * message of <tt>(cause==null ? null : cause.toString())</tt> (which
069         * typically contains the class and detail message of <tt>cause</tt>).
070         * This constructor is useful for exceptions that are little more than
071         * wrappers for other throwables (for example, {@link
072         * java.security.PrivilegedActionException}).
073         *
074         * @param cause the cause (which is saved for later retrieval by the
075         *              {@link #getCause()} method).  (A <tt>null</tt> value is
076         *              permitted, and indicates that the cause is nonexistent or
077         *              unknown.)
078         */
079        public InvalidMessageEndpointException(final Throwable cause) {
080            super(cause);
081        }
082    }