ExchangeDefaults.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.exchange;
22 
23 import org.apache.qpid.framing.AMQShortString;
24 
25 /**
26  * Defines the names of the standard AMQP exchanges that every AMQP broker should provide. These exchange names
27  * and type are given in the specification.
28  *
29  <p/><table id="crc"><caption>CRC Card</caption>
30  <tr><th> Responsibilities <th> Collaborations
31  <tr><td> Defines the standard AMQP exchange names.
32  <tr><td> Defines the standard AMQP exchange types.
33  </table>
34  *
35  * @todo A type safe enum, might be more appropriate for the exchange types.
36  */
37 public class ExchangeDefaults
38 {
39     /** The default direct exchange, which is a special internal exchange that cannot be explicitly bound to. */
40     public static final AMQShortString DEFAULT_EXCHANGE_NAME = new AMQShortString("<<default>>");
41 
42     /** The pre-defined topic exchange, the broker SHOULD provide this. */
43     public static final AMQShortString TOPIC_EXCHANGE_NAME = new AMQShortString("amq.topic");
44 
45     /** Defines the identifying type name of topic exchanges. */
46     public static final AMQShortString TOPIC_EXCHANGE_CLASS = new AMQShortString("topic");
47 
48     /** The pre-defined direct exchange, the broker MUST provide this. */
49     public static final AMQShortString DIRECT_EXCHANGE_NAME = new AMQShortString("amq.direct");
50 
51     /** Defines the identifying type name of direct exchanges. */
52     public static final AMQShortString DIRECT_EXCHANGE_CLASS = new AMQShortString("direct");
53 
54     /** The pre-defined headers exchange, the specification does not say this needs to be provided. */
55     public static final AMQShortString HEADERS_EXCHANGE_NAME = new AMQShortString("amq.match");
56 
57     /** Defines the identifying type name of headers exchanges. */
58     public static final AMQShortString HEADERS_EXCHANGE_CLASS = new AMQShortString("headers");
59 
60     /** The pre-defined fanout exchange, the boker MUST provide this. */
61     public static final AMQShortString FANOUT_EXCHANGE_NAME = new AMQShortString("amq.fanout");
62 
63     /** Defines the identifying type name of fanout exchanges. */
64     public static final AMQShortString FANOUT_EXCHANGE_CLASS = new AMQShortString("fanout");
65 }