NoRouteException.java
01 /*
02  *
03  * Licensed to the Apache Software Foundation (ASF) under one
04  * or more contributor license agreements.  See the NOTICE file
05  * distributed with this work for additional information
06  * regarding copyright ownership.  The ASF licenses this file
07  * to you under the Apache License, Version 2.0 (the
08  * "License"); you may not use this file except in compliance
09  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  */
21 package org.apache.qpid.server.exchange;
22 
23 import org.apache.qpid.protocol.AMQConstant;
24 import org.apache.qpid.server.RequiredDeliveryException;
25 import org.apache.qpid.server.queue.AMQMessage;
26 
27 /**
28  * NoRouteException is a {@link RequiredDeliveryException} that represents the failure case where a manadatory message
29  * cannot be delivered because there is no route for the message. The AMQP status code, 312, is always used to report
30  * this condition.
31  *
32  <p/><table id="crc"><caption>CRC Card</caption>
33  <tr><th> Responsibilities <th> Collaborations
34  <tr><td> Represent failure to deliver a message that must be delivered.
35  </table>
36  */
37 public class NoRouteException extends RequiredDeliveryException
38 {
39     public NoRouteException(String msg, AMQMessage amqMessage)
40     {
41         super(msg, amqMessage);
42     }
43 
44     public AMQConstant getReplyCode()
45     {
46         return AMQConstant.NO_ROUTE;
47     }
48 }