activemq-cpp-3.4.0

src/main/activemq/commands/MessageId.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  * http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _ACTIVEMQ_COMMANDS_MESSAGEID_H_
00019 #define _ACTIVEMQ_COMMANDS_MESSAGEID_H_
00020 
00021 // Turn off warning message for ignored exception specification
00022 #ifdef _MSC_VER
00023 #pragma warning( disable : 4290 )
00024 #endif
00025 
00026 #include <activemq/commands/BaseDataStructure.h>
00027 #include <activemq/commands/ProducerId.h>
00028 #include <activemq/commands/ProducerInfo.h>
00029 #include <activemq/util/Config.h>
00030 #include <decaf/lang/Comparable.h>
00031 #include <decaf/lang/Pointer.h>
00032 #include <string>
00033 #include <vector>
00034 
00035 namespace activemq{
00036 namespace commands{
00037 
00038     using decaf::lang::Pointer;
00039 
00040     /*
00041      *
00042      *  Command code for OpenWire format for MessageId
00043      *
00044      *  NOTE!: This file is auto generated - do not modify!
00045      *         if you need to make a change, please see the Java Classes
00046      *         in the activemq-cpp-openwire-generator module
00047      *
00048      */
00049     class AMQCPP_API MessageId : public BaseDataStructure, public decaf::lang::Comparable<MessageId> {
00050     protected:
00051 
00052         Pointer<ProducerId> producerId;
00053         long long producerSequenceId;
00054         long long brokerSequenceId;
00055 
00056     public:
00057 
00058         const static unsigned char ID_MESSAGEID = 110;
00059 
00060         typedef decaf::lang::PointerComparator<MessageId> COMPARATOR;
00061 
00062     private:
00063 
00064         mutable std::string key;
00065 
00066     public:
00067 
00068         MessageId();
00069 
00070         MessageId( const MessageId& other );
00071 
00072         MessageId( const std::string& messageKey );
00073 
00074         MessageId( const Pointer<ProducerInfo>& producerInfo, long long producerSequenceId );
00075 
00076         MessageId( const Pointer<ProducerId>& producerId, long long producerSequenceId );
00077 
00078         MessageId( const std::string& producerId, long long producerSequenceId );
00079 
00080         virtual ~MessageId();
00081 
00082         virtual unsigned char getDataStructureType() const;
00083 
00084         virtual MessageId* cloneDataStructure() const;
00085 
00086         virtual void copyDataStructure( const DataStructure* src );
00087 
00088         virtual std::string toString() const;
00089 
00090         virtual bool equals( const DataStructure* value ) const;
00091 
00092         void setValue( const std::string& key );
00093 
00094         void setTextView( const std::string& key );
00095 
00096         virtual const Pointer<ProducerId>& getProducerId() const;
00097         virtual Pointer<ProducerId>& getProducerId();
00098         virtual void setProducerId( const Pointer<ProducerId>& producerId );
00099 
00100         virtual long long getProducerSequenceId() const;
00101         virtual void setProducerSequenceId( long long producerSequenceId );
00102 
00103         virtual long long getBrokerSequenceId() const;
00104         virtual void setBrokerSequenceId( long long brokerSequenceId );
00105 
00106         virtual int compareTo( const MessageId& value ) const;
00107 
00108         virtual bool equals( const MessageId& value ) const;
00109 
00110         virtual bool operator==( const MessageId& value ) const;
00111 
00112         virtual bool operator<( const MessageId& value ) const;
00113 
00114         MessageId& operator= ( const MessageId& other );
00115 
00116     };
00117 
00118 }}
00119 
00120 #endif /*_ACTIVEMQ_COMMANDS_MESSAGEID_H_*/