|
activemq-cpp-3.3.0
|
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_XATRANSACTIONID_H_ 00019 #define _ACTIVEMQ_COMMANDS_XATRANSACTIONID_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/TransactionId.h> 00027 #include <activemq/util/Config.h> 00028 #include <cms/Xid.h> 00029 #include <decaf/lang/Comparable.h> 00030 #include <decaf/lang/Pointer.h> 00031 #include <string> 00032 #include <vector> 00033 00034 namespace activemq{ 00035 namespace commands{ 00036 00037 using decaf::lang::Pointer; 00038 00039 /* 00040 * 00041 * Command code for OpenWire format for XATransactionId 00042 * 00043 * NOTE!: This file is auto generated - do not modify! 00044 * if you need to make a change, please see the Java Classes 00045 * in the activemq-cpp-openwire-generator module 00046 * 00047 */ 00048 class AMQCPP_API XATransactionId : public TransactionId, public cms::Xid, public decaf::lang::Comparable<XATransactionId> { 00049 protected: 00050 00051 int formatId; 00052 std::vector<unsigned char> globalTransactionId; 00053 std::vector<unsigned char> branchQualifier; 00054 00055 public: 00056 00057 const static unsigned char ID_XATRANSACTIONID = 112; 00058 00059 typedef decaf::lang::PointerComparator<XATransactionId> COMPARATOR; 00060 00061 public: 00062 00063 XATransactionId(); 00064 00065 XATransactionId( const XATransactionId& other ); 00066 00067 XATransactionId( const cms::Xid* xid ); 00068 00069 virtual ~XATransactionId(); 00070 00071 virtual unsigned char getDataStructureType() const; 00072 00073 virtual XATransactionId* cloneDataStructure() const; 00074 00075 virtual void copyDataStructure( const DataStructure* src ); 00076 00077 virtual std::string toString() const; 00078 00079 virtual bool equals( const DataStructure* value ) const; 00080 00081 virtual bool isXATransactionId() const { 00082 return true; 00083 } 00084 00085 public: // Xid interface implementation. 00086 00087 virtual Xid* clone() const; 00088 00089 virtual bool equals( const Xid* other ) const; 00090 00091 virtual int getBranchQualifier( unsigned char* buffer, int size ) const; 00092 00093 virtual int getGlobalTransactionId( unsigned char* buffer, int size ) const; 00094 00095 virtual int getFormatId() const; 00096 virtual void setFormatId( int formatId ); 00097 00098 virtual const std::vector<unsigned char>& getGlobalTransactionId() const; 00099 virtual std::vector<unsigned char>& getGlobalTransactionId(); 00100 virtual void setGlobalTransactionId( const std::vector<unsigned char>& globalTransactionId ); 00101 00102 virtual const std::vector<unsigned char>& getBranchQualifier() const; 00103 virtual std::vector<unsigned char>& getBranchQualifier(); 00104 virtual void setBranchQualifier( const std::vector<unsigned char>& branchQualifier ); 00105 00106 virtual int compareTo( const XATransactionId& value ) const; 00107 00108 virtual bool equals( const XATransactionId& value ) const; 00109 00110 virtual bool operator==( const XATransactionId& value ) const; 00111 00112 virtual bool operator<( const XATransactionId& value ) const; 00113 00114 XATransactionId& operator= ( const XATransactionId& other ); 00115 00116 }; 00117 00118 }} 00119 00120 #endif /*_ACTIVEMQ_COMMANDS_XATRANSACTIONID_H_*/