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 */
017package org.apache.activemq.command;
018
019/**
020 * Holds the command id constants used by the command objects.
021 *
022 *
023 */
024public interface CommandTypes {
025
026    // What is the latest version of the openwire protocol
027    byte PROTOCOL_VERSION = 11;
028
029    // What is the latest version of the openwire protocol used in the stores
030    byte PROTOCOL_STORE_VERSION = 11;
031
032    // What is the legacy version that old KahaDB store's most commonly used
033    byte PROTOCOL_LEGACY_STORE_VERSION = 6;
034
035    // A marshaling layer can use this type to specify a null object.
036    byte NULL = 0;
037
038    // /////////////////////////////////////////////////
039    //
040    // Info objects sent back and forth client/server when
041    // setting up a client connection.
042    //
043    // /////////////////////////////////////////////////
044    byte WIREFORMAT_INFO = 1;
045    byte BROKER_INFO = 2;
046    byte CONNECTION_INFO = 3;
047    byte SESSION_INFO = 4;
048    byte CONSUMER_INFO = 5;
049    byte PRODUCER_INFO = 6;
050    byte TRANSACTION_INFO = 7;
051    byte DESTINATION_INFO = 8;
052    byte REMOVE_SUBSCRIPTION_INFO = 9;
053    byte KEEP_ALIVE_INFO = 10;
054    byte SHUTDOWN_INFO = 11;
055    byte REMOVE_INFO = 12;
056    byte CONTROL_COMMAND = 14;
057    byte FLUSH_COMMAND = 15;
058    byte CONNECTION_ERROR = 16;
059    byte CONSUMER_CONTROL = 17;
060    byte CONNECTION_CONTROL = 18;
061
062    // /////////////////////////////////////////////////
063    //
064    // Messages that go back and forth between the client
065    // and the server.
066    //
067    // /////////////////////////////////////////////////
068    byte PRODUCER_ACK = 19;
069    byte MESSAGE_PULL = 20;
070    byte MESSAGE_DISPATCH = 21;
071    byte MESSAGE_ACK = 22;
072
073    byte ACTIVEMQ_MESSAGE = 23;
074    byte ACTIVEMQ_BYTES_MESSAGE = 24;
075    byte ACTIVEMQ_MAP_MESSAGE = 25;
076    byte ACTIVEMQ_OBJECT_MESSAGE = 26;
077    byte ACTIVEMQ_STREAM_MESSAGE = 27;
078    byte ACTIVEMQ_TEXT_MESSAGE = 28;
079    byte ACTIVEMQ_BLOB_MESSAGE = 29;
080
081    // /////////////////////////////////////////////////
082    //
083    // Command Response messages
084    //
085    // /////////////////////////////////////////////////
086    byte RESPONSE = 30;
087    byte EXCEPTION_RESPONSE = 31;
088    byte DATA_RESPONSE = 32;
089    byte DATA_ARRAY_RESPONSE = 33;
090    byte INTEGER_RESPONSE = 34;
091
092    // /////////////////////////////////////////////////
093    //
094    // Used by discovery
095    //
096    // /////////////////////////////////////////////////
097    byte DISCOVERY_EVENT = 40;
098
099    // /////////////////////////////////////////////////
100    //
101    // Command object used by the Journal
102    //
103    // /////////////////////////////////////////////////
104    byte JOURNAL_ACK = 50;
105    byte JOURNAL_REMOVE = 52;
106    byte JOURNAL_TRACE = 53;
107    byte JOURNAL_TRANSACTION = 54;
108    byte DURABLE_SUBSCRIPTION_INFO = 55;
109
110    // /////////////////////////////////////////////////
111    //
112    // Reliability and fragmentation
113    //
114    // /////////////////////////////////////////////////
115    byte PARTIAL_COMMAND = 60;
116    byte PARTIAL_LAST_COMMAND = 61;
117
118    byte REPLAY = 65;
119
120    // /////////////////////////////////////////////////
121    //
122    // Types used represent basic Java types.
123    //
124    // /////////////////////////////////////////////////
125    byte BYTE_TYPE = 70;
126    byte CHAR_TYPE = 71;
127    byte SHORT_TYPE = 72;
128    byte INTEGER_TYPE = 73;
129    byte LONG_TYPE = 74;
130    byte DOUBLE_TYPE = 75;
131    byte FLOAT_TYPE = 76;
132    byte STRING_TYPE = 77;
133    byte BOOLEAN_TYPE = 78;
134    byte BYTE_ARRAY_TYPE = 79;
135
136    // /////////////////////////////////////////////////
137    //
138    // Broker to Broker command objects
139    //
140    // /////////////////////////////////////////////////
141
142    byte MESSAGE_DISPATCH_NOTIFICATION = 90;
143    byte NETWORK_BRIDGE_FILTER = 91;
144
145    // /////////////////////////////////////////////////
146    //
147    // Data structures contained in the command objects.
148    //
149    // /////////////////////////////////////////////////
150    byte ACTIVEMQ_QUEUE = 100;
151    byte ACTIVEMQ_TOPIC = 101;
152    byte ACTIVEMQ_TEMP_QUEUE = 102;
153    byte ACTIVEMQ_TEMP_TOPIC = 103;
154
155    byte MESSAGE_ID = 110;
156    byte ACTIVEMQ_LOCAL_TRANSACTION_ID = 111;
157    byte ACTIVEMQ_XA_TRANSACTION_ID = 112;
158
159    byte CONNECTION_ID = 120;
160    byte SESSION_ID = 121;
161    byte CONSUMER_ID = 122;
162    byte PRODUCER_ID = 123;
163    byte BROKER_ID = 124;
164
165}