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