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_MESSAGEACK_H_ 00019 #define _ACTIVEMQ_COMMANDS_MESSAGEACK_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/ActiveMQDestination.h> 00027 #include <activemq/commands/BaseCommand.h> 00028 #include <activemq/commands/BrokerError.h> 00029 #include <activemq/commands/ConsumerId.h> 00030 #include <activemq/commands/Message.h> 00031 #include <activemq/commands/MessageDispatch.h> 00032 #include <activemq/commands/MessageId.h> 00033 #include <activemq/commands/TransactionId.h> 00034 #include <activemq/util/Config.h> 00035 #include <decaf/lang/Pointer.h> 00036 #include <string> 00037 #include <vector> 00038 00039 namespace activemq { 00040 namespace commands { 00041 00042 using decaf::lang::Pointer; 00043 00044 /* 00045 * 00046 * Command code for OpenWire format for MessageAck 00047 * 00048 * NOTE!: This file is auto generated - do not modify! 00049 * if you need to make a change, please see the Java Classes 00050 * in the activemq-cpp-openwire-generator module 00051 * 00052 */ 00053 class AMQCPP_API MessageAck : public BaseCommand { 00054 protected: 00055 00056 Pointer<ActiveMQDestination> destination; 00057 Pointer<TransactionId> transactionId; 00058 Pointer<ConsumerId> consumerId; 00059 unsigned char ackType; 00060 Pointer<MessageId> firstMessageId; 00061 Pointer<MessageId> lastMessageId; 00062 int messageCount; 00063 Pointer<BrokerError> poisonCause; 00064 00065 public: 00066 00067 const static unsigned char ID_MESSAGEACK = 22; 00068 00069 private: 00070 00071 MessageAck(const MessageAck&); 00072 MessageAck& operator= (const MessageAck&); 00073 00074 public: 00075 00076 MessageAck(); 00077 00078 MessageAck(const Pointer<Message>& message, int ackType, int messageCount); 00079 00080 MessageAck(const Pointer<MessageDispatch>& dispatch, int ackType, int messageCount); 00081 00082 virtual ~MessageAck(); 00083 00084 virtual unsigned char getDataStructureType() const; 00085 00086 virtual MessageAck* cloneDataStructure() const; 00087 00088 virtual void copyDataStructure(const DataStructure* src); 00089 00090 virtual std::string toString() const; 00091 00092 virtual bool equals(const DataStructure* value) const; 00093 00094 virtual const Pointer<ActiveMQDestination>& getDestination() const; 00095 virtual Pointer<ActiveMQDestination>& getDestination(); 00096 virtual void setDestination( const Pointer<ActiveMQDestination>& destination ); 00097 00098 virtual const Pointer<TransactionId>& getTransactionId() const; 00099 virtual Pointer<TransactionId>& getTransactionId(); 00100 virtual void setTransactionId( const Pointer<TransactionId>& transactionId ); 00101 00102 virtual const Pointer<ConsumerId>& getConsumerId() const; 00103 virtual Pointer<ConsumerId>& getConsumerId(); 00104 virtual void setConsumerId( const Pointer<ConsumerId>& consumerId ); 00105 00106 virtual unsigned char getAckType() const; 00107 virtual void setAckType( unsigned char ackType ); 00108 00109 virtual const Pointer<MessageId>& getFirstMessageId() const; 00110 virtual Pointer<MessageId>& getFirstMessageId(); 00111 virtual void setFirstMessageId( const Pointer<MessageId>& firstMessageId ); 00112 00113 virtual const Pointer<MessageId>& getLastMessageId() const; 00114 virtual Pointer<MessageId>& getLastMessageId(); 00115 virtual void setLastMessageId( const Pointer<MessageId>& lastMessageId ); 00116 00117 virtual int getMessageCount() const; 00118 virtual void setMessageCount( int messageCount ); 00119 00120 virtual const Pointer<BrokerError>& getPoisonCause() const; 00121 virtual Pointer<BrokerError>& getPoisonCause(); 00122 virtual void setPoisonCause( const Pointer<BrokerError>& poisonCause ); 00123 00127 virtual bool isMessageAck() const { 00128 return true; 00129 } 00130 00131 virtual Pointer<Command> visit(activemq::state::CommandVisitor* visitor); 00132 00133 }; 00134 00135 }} 00136 00137 #endif /*_ACTIVEMQ_COMMANDS_MESSAGEACK_H_*/
1.6.1