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