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