You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by nm...@apache.org on 2006/05/15 15:39:33 UTC
svn commit: r406628 [2/10] - in /incubator/activemq/trunk/openwire-cpp: ./
src/gram/java/org/apache/activemq/openwire/tool/ src/gram/script/
src/main/cpp/activemq/ src/main/cpp/activemq/command/
src/main/cpp/activemq/protocol/ src/main/cpp/activemq/pro...
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.cpp Mon May 15 06:38:57 2006
@@ -23,6 +23,7 @@
*/
ActiveMQTextMessage::ActiveMQTextMessage()
{
+ encoder = CharsetEncoderRegistry::getEncoder() ;
setText(NULL) ;
}
@@ -31,6 +32,16 @@
*/
ActiveMQTextMessage::ActiveMQTextMessage(const char* text)
{
+ encoder = CharsetEncoderRegistry::getEncoder() ;
+ setText(text) ;
+}
+
+/*
+ *
+ */
+ActiveMQTextMessage::ActiveMQTextMessage(const char* text, const char* encname)
+{
+ encoder = CharsetEncoderRegistry::getEncoder(encname) ;
setText(text) ;
}
@@ -57,17 +68,16 @@
// Extract text from message content
if( this->content.size() > 0 )
{
- int utflen = 0 ;
- char* buffer = this->content.c_array() ;
+ p<string> value ;
+
+ // Use undecoded string, skip string length
+ value = new string( this->content.c_array() + sizeof(int), this->content.size() - sizeof(int) ) ;
- // TODO: assuming that the text is ASCII
- utflen |= (char) ((buffer[0] << 24) & 0xFF) ;
- utflen |= (char) ((buffer[1] >> 16) & 0xFF);
- utflen |= (char) ((buffer[2] >> 8) & 0xFF);
- utflen |= (char) ((buffer[3] >> 0) & 0xFF);
+ // Decode string if an encoder has been set up
+ if( encoder != NULL )
+ value = encoder->decode( value ) ;
- p<string> text = new string( buffer + 4, this->content.size() - 4 ) ;
- return text ;
+ return value ;
}
return NULL ;
}
@@ -79,19 +89,32 @@
{
if( text != NULL )
{
- int length = (int)strlen(text) ;
- int utflen = length ;
-
- // TODO: assuming that the text is ASCII
- this->content = array<char> (length + 4) ;
-
- this->content[0] = (char) ((utflen >> 24) & 0xFF) ;
- this->content[1] = (char) ((utflen >> 16) & 0xFF);
- this->content[2] = (char) ((utflen >> 8) & 0xFF);
- this->content[3] = (char) ((utflen >> 0) & 0xFF);
+ p<DataOutputStream> dos ;
+ p<ByteArrayOutputStream> bos ;
+ p<string> value ;
+ int length ;
+
+ // Set up in-memory streams
+ bos = new ByteArrayOutputStream() ;
+ dos = new DataOutputStream( bos ) ;
+
+ // Encode string if an encoder has been set up
+ if( encoder != NULL )
+ {
+ // Encode string
+ value = encoder->encode( p<string> (new string(text)), &length) ;
+ }
+ else // ...use unencoded string
+ {
+ length = (int)strlen(text) ;
+ value = new string(text) ;
+ }
+ // Prepend data with the string length (4 bytes)
+ dos->writeInt( length ) ;
+ dos->write( value->c_str(), 0, length ) ;
- for( int i = 0 ; i < length ; i++ )
- this->content[4+i] = text[i] ;
+ // Finally, store text in content holder
+ this->content = bos->toArray() ;
}
else
this->content = NULL ;
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTextMessage.hpp Mon May 15 06:38:57 2006
@@ -20,6 +20,10 @@
#include <string>
#include "cms/ITextMessage.hpp"
#include "activemq/command/ActiveMQMessage.hpp"
+#include "ppr/io/ByteArrayOutputStream.hpp"
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/io/encoding/ICharsetEncoder.hpp"
+#include "ppr/io/encoding/CharsetEncoderRegistry.hpp"
#include "ppr/util/MapItemHolder.hpp"
#include "ppr/util/ifr/p"
@@ -31,6 +35,8 @@
{
using namespace ifr;
using namespace apache::cms;
+ using namespace apache::ppr::io;
+ using namespace apache::ppr::io::encoding;
using namespace apache::ppr::util;
/*
@@ -38,12 +44,16 @@
*/
class ActiveMQTextMessage : public ActiveMQMessage, public ITextMessage
{
+private:
+ p<ICharsetEncoder> encoder ;
+
public:
const static unsigned char TYPE = 28 ;
public:
ActiveMQTextMessage() ;
ActiveMQTextMessage(const char* text) ;
+ ActiveMQTextMessage(const char* text, const char* encname) ;
virtual ~ActiveMQTextMessage() ;
virtual unsigned char getDataStructureType() ;
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.cpp Mon May 15 06:38:57 2006
@@ -21,17 +21,77 @@
// Attribute methods ------------------------------------------------
+/*
+ *
+ */
+int BaseCommand::getCommandId()
+{
+ return commandId ;
+}
+
+/*
+ *
+ */
+void BaseCommand::setCommandId(int id)
+{
+ commandId = id ;
+}
+
+/*
+ *
+ */
+bool BaseCommand::getResponseRequired()
+{
+ return responseRequired ;
+}
+
+/*
+ *
+ */
+void BaseCommand::setResponseRequired(bool value)
+{
+ responseRequired = value ;
+}
+
+/*
+ *
+ */
int BaseCommand::getHashCode()
{
- return ( commandId * 38 ) + getDataStructureType() ;
+ return ( commandId * 38 ) + BaseDataStructure::getDataStructureType() ;
}
// Operation methods ------------------------------------------------
+/*
+ *
+ */
+int BaseCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
+{
+ int size = 0 ;
+
+ size += marshaller->marshalInt(commandId, mode, ostream) ;
+ size += marshaller->marshalBoolean(responseRequired, mode, ostream) ;
+
+ return size ;
+}
+
+/*
+ *
+ */
+void BaseCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
+{
+ commandId = marshaller->unmarshalInt(mode, istream) ;
+ responseRequired = marshaller->unmarshalBoolean(mode, istream) ;
+}
+
+/*
+ *
+ */
bool BaseCommand::operator== (BaseCommand& that)
{
- if( this->getDataStructureType() == that.getDataStructureType() &&
+ if( BaseDataStructure::getDataStructureType() == ((BaseDataStructure)that).getDataStructureType() &&
this->commandId == that.commandId )
{
return true ;
@@ -39,12 +99,15 @@
return false ;
}
+/*
+ *
+ */
p<string> BaseCommand::toString()
{
p<string> str = new string() ;
char buffer[10] ;
- str->assign( getDataStructureTypeAsString( getDataStructureType() )->c_str() ) ;
+ str->assign( BaseDataStructure::getDataStructureTypeAsString( BaseDataStructure::getDataStructureType() )->c_str() ) ;
if( str->length() == 0 )
str->assign("") ;
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseCommand.hpp Mon May 15 06:38:57 2006
@@ -18,7 +18,12 @@
#define ActiveMQ_BaseCommand_hpp_
#include <string>
-#include "activemq/command/AbstractCommand.hpp"
+#include "activemq/ICommand.hpp"
+#include "activemq/command/BaseDataStructure.hpp"
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/p"
namespace apache
@@ -29,13 +34,28 @@
{
using namespace ifr;
using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
/*
*
*/
-class BaseCommand : public AbstractCommand
+class BaseCommand : public BaseDataStructure, public ICommand
{
+protected:
+ int commandId ;
+ bool responseRequired ;
+
public:
+ virtual int getCommandId() ;
+ virtual void setCommandId(int id) ;
+ virtual bool getResponseRequired() ;
+ virtual void setResponseRequired(bool value) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
+
// Equals operator
bool operator== (BaseCommand& other) ;
Added: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.cpp?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.cpp Mon May 15 06:38:57 2006
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <string.h>
+#include "activemq/command/BaseDataStructure.hpp"
+
+#include "activemq/command/ActiveMQMessage.hpp"
+#include "activemq/command/ActiveMQBytesMessage.hpp"
+#include "activemq/command/ActiveMQMapMessage.hpp"
+#include "activemq/command/ActiveMQObjectMessage.hpp"
+#include "activemq/command/ActiveMQStreamMessage.hpp"
+#include "activemq/command/ActiveMQTextMessage.hpp"
+#include "activemq/command/ActiveMQQueue.hpp"
+#include "activemq/command/ActiveMQTopic.hpp"
+#include "activemq/command/ActiveMQTempQueue.hpp"
+#include "activemq/command/ActiveMQTempTopic.hpp"
+#include "activemq/command/ExceptionResponse.hpp"
+#include "activemq/command/ConnectionId.hpp"
+#include "activemq/command/ConsumerId.hpp"
+#include "activemq/command/ProducerId.hpp"
+#include "activemq/command/MessageId.hpp"
+#include "activemq/command/LocalTransactionId.hpp"
+#include "activemq/command/MessageAck.hpp"
+#include "activemq/command/MessageDispatch.hpp"
+#include "activemq/command/Response.hpp"
+#include "activemq/command/ConsumerInfo.hpp"
+#include "activemq/command/IntegerResponse.hpp"
+#include "activemq/command/ProducerInfo.hpp"
+#include "activemq/command/BrokerInfo.hpp"
+#include "activemq/command/KeepAliveInfo.hpp"
+#include "activemq/command/ConnectionInfo.hpp"
+#include "activemq/command/RemoveInfo.hpp"
+#include "activemq/command/RemoveSubscriptionInfo.hpp"
+#include "activemq/command/SessionInfo.hpp"
+#include "activemq/command/TransactionInfo.hpp"
+#include "activemq/command/WireFormatInfo.hpp"
+#include "activemq/command/BrokerId.hpp"
+#include "activemq/command/ShutdownInfo.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ */
+unsigned char BaseDataStructure::getDataStructureType()
+{
+ return 0 ;
+}
+
+/*
+ *
+ */
+int BaseDataStructure::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
+{
+ return 0 ;
+}
+
+/*
+ *
+ */
+void BaseDataStructure::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
+{
+}
+
+/*
+ *
+ */
+p<IDataStructure> BaseDataStructure::createObject(unsigned char type)
+{
+ switch( type )
+ {
+ case ActiveMQMessage::TYPE:
+ return new ActiveMQMessage() ;
+ case ActiveMQTextMessage::TYPE:
+ return new ActiveMQTextMessage() ;
+ case ActiveMQObjectMessage::TYPE:
+ return new ActiveMQObjectMessage() ;
+ case ActiveMQBytesMessage::TYPE:
+ return new ActiveMQBytesMessage() ;
+ case ActiveMQStreamMessage::TYPE:
+ return new ActiveMQStreamMessage() ;
+ case ActiveMQMapMessage::TYPE:
+ return new ActiveMQMapMessage() ;
+ case ActiveMQQueue::TYPE:
+ return new ActiveMQQueue() ;
+ case ActiveMQTopic::TYPE:
+ return new ActiveMQTopic() ;
+ case ActiveMQTempQueue::TYPE:
+ return new ActiveMQTempQueue() ;
+ case ActiveMQTempTopic::TYPE:
+ return new ActiveMQTempTopic() ;
+ case ExceptionResponse::TYPE:
+ return new ExceptionResponse() ;
+ case ConnectionId::TYPE:
+ return new ConnectionId() ;
+ case ConsumerId::TYPE:
+ return new ConsumerId() ;
+ case ProducerId::TYPE:
+ return new ProducerId() ;
+ case MessageId::TYPE:
+ return new MessageId() ;
+ case LocalTransactionId::TYPE:
+ return new LocalTransactionId() ;
+ case MessageAck::TYPE:
+ return new MessageAck() ;
+ case MessageDispatch::TYPE:
+ return new MessageDispatch() ;
+ case Response::TYPE:
+ return new Response() ;
+ case ConsumerInfo::TYPE:
+ return new ConsumerInfo() ;
+ case ProducerInfo::TYPE:
+ return new ProducerInfo() ;
+ case TransactionInfo::TYPE:
+ return new TransactionInfo() ;
+ case BrokerInfo::TYPE:
+ return new BrokerInfo() ;
+ case BrokerId::TYPE:
+ return new BrokerId() ;
+ case ConnectionInfo::TYPE:
+ return new ConnectionInfo() ;
+ case SessionInfo::TYPE:
+ return new SessionInfo() ;
+ case RemoveSubscriptionInfo::TYPE:
+ return new RemoveSubscriptionInfo() ;
+ case IntegerResponse::TYPE:
+ return new IntegerResponse() ;
+ case WireFormatInfo::TYPE:
+ return new WireFormatInfo() ;
+ case RemoveInfo::TYPE:
+ return new RemoveInfo() ;
+ case KeepAliveInfo::TYPE:
+ return new KeepAliveInfo() ;
+ case ShutdownInfo::TYPE:
+ return new ShutdownInfo() ;
+ default:
+ return NULL ;
+ }
+ }
+
+/*
+ *
+ */
+p<string> BaseDataStructure::getDataStructureTypeAsString(unsigned char type)
+{
+ p<string> packetType = new string() ;
+
+ switch( type )
+ {
+ case ActiveMQMessage::TYPE:
+ packetType->assign("ACTIVEMQ_MESSAGE") ;
+ break ;
+ case ActiveMQTextMessage::TYPE:
+ packetType->assign("ACTIVEMQ_TEXT_MESSAGE") ;
+ break ;
+ case ActiveMQObjectMessage::TYPE:
+ packetType->assign("ACTIVEMQ_OBJECT_MESSAGE") ;
+ break ;
+ case ActiveMQBytesMessage::TYPE:
+ packetType->assign("ACTIVEMQ_BYTES_MESSAGE") ;
+ break ;
+ case ActiveMQStreamMessage::TYPE:
+ packetType->assign("ACTIVEMQ_STREAM_MESSAGE") ;
+ break ;
+ case ActiveMQMapMessage::TYPE:
+ packetType->assign("ACTIVEMQ_MAP_MESSAGE") ;
+ break ;
+ case ActiveMQQueue::TYPE:
+ packetType->assign("ACTIVEMQ_QUEUE") ;
+ break ;
+ case ActiveMQTopic::TYPE:
+ packetType->assign("ACTIVEMQ_TOPIC") ;
+ break ;
+ case ConnectionId::TYPE:
+ packetType->assign("CONNECTION_ID") ;
+ break ;
+ case ConsumerId::TYPE:
+ packetType->assign("CONSUMER_ID") ;
+ break ;
+ case ProducerId::TYPE:
+ packetType->assign("PRODUCER_ID") ;
+ break ;
+ case MessageId::TYPE:
+ packetType->assign("MESSAGE_ID") ;
+ break ;
+ case LocalTransactionId::TYPE:
+ packetType->assign("LOCAL_TRANSACTION_ID") ;
+ break ;
+ case MessageAck::TYPE:
+ packetType->assign("ACTIVEMQ_MSG_ACK") ;
+ break ;
+ case MessageDispatch::TYPE:
+ packetType->assign("ACTIVEMQ_MSG_DISPATCH") ;
+ break ;
+ case Response::TYPE:
+ packetType->assign("RESPONSE") ;
+ break ;
+ case ExceptionResponse::TYPE:
+ packetType->assign("EXCEPTION_RESPONSE") ;
+ break ;
+ case ConsumerInfo::TYPE:
+ packetType->assign("CONSUMER_INFO") ;
+ break ;
+ case ProducerInfo::TYPE:
+ packetType->assign("PRODUCER_INFO") ;
+ break;
+ case TransactionInfo::TYPE:
+ packetType->assign("TRANSACTION_INFO") ;
+ break ;
+ case BrokerInfo::TYPE:
+ packetType->assign("BROKER_INFO") ;
+ break ;
+ case ConnectionInfo::TYPE:
+ packetType->assign("CONNECTION_INFO") ;
+ break ;
+ case SessionInfo::TYPE:
+ packetType->assign("SESSION_INFO") ;
+ break ;
+ case RemoveSubscriptionInfo::TYPE:
+ packetType->assign("DURABLE_UNSUBSCRIBE") ;
+ break ;
+ case IntegerResponse::TYPE:
+ packetType->assign("INT_RESPONSE_RECEIPT_INFO") ;
+ break ;
+ case WireFormatInfo::TYPE:
+ packetType->assign("WIRE_FORMAT_INFO") ;
+ break ;
+ case RemoveInfo::TYPE:
+ packetType->assign("REMOVE_INFO") ;
+ break ;
+ case KeepAliveInfo::TYPE:
+ packetType->assign("KEEP_ALIVE") ;
+ break ;
+ case ShutdownInfo::TYPE:
+ packetType->assign("SHUTDOWN") ;
+ break ;
+ default:
+ packetType->assign("UNDEFINED") ;
+ break ;
+ }
+ return packetType ;
+}
Added: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.hpp?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BaseDataStructure.hpp Mon May 15 06:38:57 2006
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef ActiveMQ_BaseDataStructure_hpp_
+#define ActiveMQ_BaseDataStructure_hpp_
+
+#include <string>
+#include "activemq/IDataStructure.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ */
+class BaseDataStructure : public IDataStructure
+{
+protected:
+ BaseDataStructure() { } ;
+
+public:
+ virtual unsigned char getDataStructureType() ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
+
+ static p<IDataStructure> createObject(unsigned char type) ;
+ static p<string> getDataStructureTypeAsString(unsigned char type) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_BaseDataStructure_hpp_*/
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerError.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerError.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerError.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerError.hpp Mon May 15 06:38:57 2006
@@ -20,7 +20,7 @@
#include <string>
#include <ostream>
#include <sstream>
-#include "activemq/command/AbstractCommand.hpp"
+#include "activemq/command/BaseCommand.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
@@ -47,7 +47,7 @@
/*
* Represents an exception on the broker.
*/
-class BrokerError : public AbstractCommand
+class BrokerError : public BaseCommand
{
private:
p<string> message ;
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.cpp Mon May 15 06:38:57 2006
@@ -1,67 +1,69 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "activemq/command/BrokerId.hpp"
-
-using namespace apache::activemq::command;
-
-/*
- *
- * Marshalling code for Open Wire Format for BrokerId
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-BrokerId::BrokerId()
-{
- this->value = NULL ;
-}
-
-BrokerId::~BrokerId()
-{
-}
-
-unsigned char BrokerId::getDataStructureType()
-{
- return BrokerId::TYPE ;
-}
-
-
-p<string> BrokerId::getValue()
-{
- return value ;
-}
-
-void BrokerId::setValue(p<string> value)
-{
- this->value = value ;
-}
-
-int BrokerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
-{
- int size = 0 ;
-
- size += marshaller->marshalString(value, mode, writer) ;
- return size ;
-}
-
-void BrokerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
-{
- value = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
-}
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/BrokerId.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for BrokerId
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+BrokerId::BrokerId()
+{
+ this->value = NULL ;
+}
+
+BrokerId::~BrokerId()
+{
+}
+
+unsigned char BrokerId::getDataStructureType()
+{
+ return BrokerId::TYPE ;
+}
+
+
+p<string> BrokerId::getValue()
+{
+ return value ;
+}
+
+void BrokerId::setValue(p<string> value)
+{
+ this->value = value ;
+}
+
+int BrokerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalString(value, mode, ostream) ;
+ return size ;
+}
+
+void BrokerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseDataStructure::unmarshal(marshaller, mode, istream) ;
+ value = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+}
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerId.hpp Mon May 15 06:38:57 2006
@@ -1,82 +1,83 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef ActiveMQ_BrokerId_hpp_
-#define ActiveMQ_BrokerId_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "activemq/command/AbstractCommand.hpp"
-#include "activemq/protocol/IMarshaller.hpp"
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
- using namespace apache::activemq;
- using namespace apache::activemq::protocol;
- using namespace apache::ppr::io;
-
-/*
- *
- * Marshalling code for Open Wire Format for BrokerId
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-class BrokerId : public AbstractCommand
-{
-protected:
- p<string> value ;
-
-public:
- const static unsigned char TYPE = 124;
-
-public:
- BrokerId() ;
- virtual ~BrokerId() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual p<string> getValue() ;
- virtual void setValue(p<string> value) ;
-
- virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
- virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_BrokerId_hpp_*/
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef ActiveMQ_BrokerId_hpp_
+#define ActiveMQ_BrokerId_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "activemq/command/BaseDataStructure.hpp"
+
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for BrokerId
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+class BrokerId : public BaseDataStructure
+{
+protected:
+ p<string> value ;
+
+public:
+ const static unsigned char TYPE = 124;
+
+public:
+ BrokerId() ;
+ virtual ~BrokerId() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual p<string> getValue() ;
+ virtual void setValue(p<string> value) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_BrokerId_hpp_*/
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.cpp Mon May 15 06:38:57 2006
@@ -1,127 +1,153 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "activemq/command/BrokerInfo.hpp"
-
-using namespace apache::activemq::command;
-
-/*
- *
- * Marshalling code for Open Wire Format for BrokerInfo
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-BrokerInfo::BrokerInfo()
-{
- this->brokerId = NULL ;
- this->brokerURL = NULL ;
- this->peerBrokerInfos = NULL ;
- this->brokerName = NULL ;
- this->slaveBroker = false ;
-}
-
-BrokerInfo::~BrokerInfo()
-{
-}
-
-unsigned char BrokerInfo::getDataStructureType()
-{
- return BrokerInfo::TYPE ;
-}
-
-
-p<BrokerId> BrokerInfo::getBrokerId()
-{
- return brokerId ;
-}
-
-void BrokerInfo::setBrokerId(p<BrokerId> brokerId)
-{
- this->brokerId = brokerId ;
-}
-
-
-p<string> BrokerInfo::getBrokerURL()
-{
- return brokerURL ;
-}
-
-void BrokerInfo::setBrokerURL(p<string> brokerURL)
-{
- this->brokerURL = brokerURL ;
-}
-
-
-array<BrokerInfo> BrokerInfo::getPeerBrokerInfos()
-{
- return peerBrokerInfos ;
-}
-
-void BrokerInfo::setPeerBrokerInfos(array<BrokerInfo> peerBrokerInfos)
-{
- this->peerBrokerInfos = peerBrokerInfos ;
-}
-
-
-p<string> BrokerInfo::getBrokerName()
-{
- return brokerName ;
-}
-
-void BrokerInfo::setBrokerName(p<string> brokerName)
-{
- this->brokerName = brokerName ;
-}
-
-
-bool BrokerInfo::getSlaveBroker()
-{
- return slaveBroker ;
-}
-
-void BrokerInfo::setSlaveBroker(bool slaveBroker)
-{
- this->slaveBroker = slaveBroker ;
-}
-
-int BrokerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
-{
- int size = 0 ;
-
- size += marshaller->marshalInt(commandId, mode, writer) ;
- size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
- size += marshaller->marshalObject(brokerId, mode, writer) ;
- size += marshaller->marshalString(brokerURL, mode, writer) ;
- size += marshaller->marshalObjectArray(peerBrokerInfos, mode, writer) ;
- size += marshaller->marshalString(brokerName, mode, writer) ;
- size += marshaller->marshalBoolean(slaveBroker, mode, writer) ;
- return size ;
-}
-
-void BrokerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
-{
- commandId = marshaller->unmarshalInt(mode, reader) ;
- responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
- brokerId = p_cast<BrokerId>(marshaller->unmarshalObject(mode, reader)) ;
- brokerURL = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
- peerBrokerInfos = array_cast<BrokerInfo>(marshaller->unmarshalObjectArray(mode, reader)) ;
- brokerName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
- slaveBroker = (marshaller->unmarshalBoolean(mode, reader)) ;
-}
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/BrokerInfo.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for BrokerInfo
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+BrokerInfo::BrokerInfo()
+{
+ this->brokerId = NULL ;
+ this->brokerURL = NULL ;
+ this->peerBrokerInfos = NULL ;
+ this->brokerName = NULL ;
+ this->slaveBroker = false ;
+ this->masterBroker = false ;
+ this->faultTolerantConfiguration = false ;
+}
+
+BrokerInfo::~BrokerInfo()
+{
+}
+
+unsigned char BrokerInfo::getDataStructureType()
+{
+ return BrokerInfo::TYPE ;
+}
+
+
+p<BrokerId> BrokerInfo::getBrokerId()
+{
+ return brokerId ;
+}
+
+void BrokerInfo::setBrokerId(p<BrokerId> brokerId)
+{
+ this->brokerId = brokerId ;
+}
+
+
+p<string> BrokerInfo::getBrokerURL()
+{
+ return brokerURL ;
+}
+
+void BrokerInfo::setBrokerURL(p<string> brokerURL)
+{
+ this->brokerURL = brokerURL ;
+}
+
+
+array<BrokerInfo> BrokerInfo::getPeerBrokerInfos()
+{
+ return peerBrokerInfos ;
+}
+
+void BrokerInfo::setPeerBrokerInfos(array<BrokerInfo> peerBrokerInfos)
+{
+ this->peerBrokerInfos = peerBrokerInfos ;
+}
+
+
+p<string> BrokerInfo::getBrokerName()
+{
+ return brokerName ;
+}
+
+void BrokerInfo::setBrokerName(p<string> brokerName)
+{
+ this->brokerName = brokerName ;
+}
+
+
+bool BrokerInfo::getSlaveBroker()
+{
+ return slaveBroker ;
+}
+
+void BrokerInfo::setSlaveBroker(bool slaveBroker)
+{
+ this->slaveBroker = slaveBroker ;
+}
+
+
+bool BrokerInfo::getMasterBroker()
+{
+ return masterBroker ;
+}
+
+void BrokerInfo::setMasterBroker(bool masterBroker)
+{
+ this->masterBroker = masterBroker ;
+}
+
+
+bool BrokerInfo::getFaultTolerantConfiguration()
+{
+ return faultTolerantConfiguration ;
+}
+
+void BrokerInfo::setFaultTolerantConfiguration(bool faultTolerantConfiguration)
+{
+ this->faultTolerantConfiguration = faultTolerantConfiguration ;
+}
+
+int BrokerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseCommand::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalObject(brokerId, mode, ostream) ;
+ size += marshaller->marshalString(brokerURL, mode, ostream) ;
+ size += marshaller->marshalObjectArray(peerBrokerInfos, mode, ostream) ;
+ size += marshaller->marshalString(brokerName, mode, ostream) ;
+ size += marshaller->marshalBoolean(slaveBroker, mode, ostream) ;
+ size += marshaller->marshalBoolean(masterBroker, mode, ostream) ;
+ size += marshaller->marshalBoolean(faultTolerantConfiguration, mode, ostream) ;
+ return size ;
+}
+
+void BrokerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseCommand::unmarshal(marshaller, mode, istream) ;
+ brokerId = p_cast<BrokerId>(marshaller->unmarshalObject(mode, istream)) ;
+ brokerURL = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+ peerBrokerInfos = array_cast<BrokerInfo>(marshaller->unmarshalObjectArray(mode, istream)) ;
+ brokerName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+ slaveBroker = (marshaller->unmarshalBoolean(mode, istream)) ;
+ masterBroker = (marshaller->unmarshalBoolean(mode, istream)) ;
+ faultTolerantConfiguration = (marshaller->unmarshalBoolean(mode, istream)) ;
+}
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/BrokerInfo.hpp Mon May 15 06:38:57 2006
@@ -1,100 +1,109 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef ActiveMQ_BrokerInfo_hpp_
-#define ActiveMQ_BrokerInfo_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "activemq/command/BaseCommand.hpp"
-#include "activemq/command/BrokerId.hpp"
-#include "activemq/command/BrokerInfo.hpp"
-#include "activemq/protocol/IMarshaller.hpp"
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
- using namespace apache::activemq;
- using namespace apache::activemq::protocol;
- using namespace apache::ppr::io;
-
-/*
- *
- * Marshalling code for Open Wire Format for BrokerInfo
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-class BrokerInfo : public BaseCommand
-{
-protected:
- p<BrokerId> brokerId ;
- p<string> brokerURL ;
- array<BrokerInfo> peerBrokerInfos ;
- p<string> brokerName ;
- bool slaveBroker ;
-
-public:
- const static unsigned char TYPE = 2;
-
-public:
- BrokerInfo() ;
- virtual ~BrokerInfo() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual p<BrokerId> getBrokerId() ;
- virtual void setBrokerId(p<BrokerId> brokerId) ;
-
- virtual p<string> getBrokerURL() ;
- virtual void setBrokerURL(p<string> brokerURL) ;
-
- virtual array<BrokerInfo> getPeerBrokerInfos() ;
- virtual void setPeerBrokerInfos(array<BrokerInfo> peerBrokerInfos) ;
-
- virtual p<string> getBrokerName() ;
- virtual void setBrokerName(p<string> brokerName) ;
-
- virtual bool getSlaveBroker() ;
- virtual void setSlaveBroker(bool slaveBroker) ;
-
- virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
- virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_BrokerInfo_hpp_*/
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef ActiveMQ_BrokerInfo_hpp_
+#define ActiveMQ_BrokerInfo_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "activemq/command/BaseCommand.hpp"
+#include "activemq/command/BrokerId.hpp"
+#include "activemq/command/BrokerInfo.hpp"
+
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for BrokerInfo
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+class BrokerInfo : public BaseCommand
+{
+protected:
+ p<BrokerId> brokerId ;
+ p<string> brokerURL ;
+ array<BrokerInfo> peerBrokerInfos ;
+ p<string> brokerName ;
+ bool slaveBroker ;
+ bool masterBroker ;
+ bool faultTolerantConfiguration ;
+
+public:
+ const static unsigned char TYPE = 2;
+
+public:
+ BrokerInfo() ;
+ virtual ~BrokerInfo() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual p<BrokerId> getBrokerId() ;
+ virtual void setBrokerId(p<BrokerId> brokerId) ;
+
+ virtual p<string> getBrokerURL() ;
+ virtual void setBrokerURL(p<string> brokerURL) ;
+
+ virtual array<BrokerInfo> getPeerBrokerInfos() ;
+ virtual void setPeerBrokerInfos(array<BrokerInfo> peerBrokerInfos) ;
+
+ virtual p<string> getBrokerName() ;
+ virtual void setBrokerName(p<string> brokerName) ;
+
+ virtual bool getSlaveBroker() ;
+ virtual void setSlaveBroker(bool slaveBroker) ;
+
+ virtual bool getMasterBroker() ;
+ virtual void setMasterBroker(bool masterBroker) ;
+
+ virtual bool getFaultTolerantConfiguration() ;
+ virtual void setFaultTolerantConfiguration(bool faultTolerantConfiguration) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_BrokerInfo_hpp_*/
Added: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.cpp?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.cpp Mon May 15 06:38:57 2006
@@ -0,0 +1,125 @@
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/ConnectionControl.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionControl
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+ConnectionControl::ConnectionControl()
+{
+ this->close = false ;
+ this->exit = false ;
+ this->faultTolerant = false ;
+ this->resume = false ;
+ this->suspend = false ;
+}
+
+ConnectionControl::~ConnectionControl()
+{
+}
+
+unsigned char ConnectionControl::getDataStructureType()
+{
+ return ConnectionControl::TYPE ;
+}
+
+
+bool ConnectionControl::getClose()
+{
+ return close ;
+}
+
+void ConnectionControl::setClose(bool close)
+{
+ this->close = close ;
+}
+
+
+bool ConnectionControl::getExit()
+{
+ return exit ;
+}
+
+void ConnectionControl::setExit(bool exit)
+{
+ this->exit = exit ;
+}
+
+
+bool ConnectionControl::getFaultTolerant()
+{
+ return faultTolerant ;
+}
+
+void ConnectionControl::setFaultTolerant(bool faultTolerant)
+{
+ this->faultTolerant = faultTolerant ;
+}
+
+
+bool ConnectionControl::getResume()
+{
+ return resume ;
+}
+
+void ConnectionControl::setResume(bool resume)
+{
+ this->resume = resume ;
+}
+
+
+bool ConnectionControl::getSuspend()
+{
+ return suspend ;
+}
+
+void ConnectionControl::setSuspend(bool suspend)
+{
+ this->suspend = suspend ;
+}
+
+int ConnectionControl::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseCommand::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalBoolean(close, mode, ostream) ;
+ size += marshaller->marshalBoolean(exit, mode, ostream) ;
+ size += marshaller->marshalBoolean(faultTolerant, mode, ostream) ;
+ size += marshaller->marshalBoolean(resume, mode, ostream) ;
+ size += marshaller->marshalBoolean(suspend, mode, ostream) ;
+ return size ;
+}
+
+void ConnectionControl::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseCommand::unmarshal(marshaller, mode, istream) ;
+ close = (marshaller->unmarshalBoolean(mode, istream)) ;
+ exit = (marshaller->unmarshalBoolean(mode, istream)) ;
+ faultTolerant = (marshaller->unmarshalBoolean(mode, istream)) ;
+ resume = (marshaller->unmarshalBoolean(mode, istream)) ;
+ suspend = (marshaller->unmarshalBoolean(mode, istream)) ;
+}
Added: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.hpp?rev=406628&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionControl.hpp Mon May 15 06:38:57 2006
@@ -0,0 +1,99 @@
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef ActiveMQ_ConnectionControl_hpp_
+#define ActiveMQ_ConnectionControl_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "activemq/command/BaseCommand.hpp"
+
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionControl
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+class ConnectionControl : public BaseCommand
+{
+protected:
+ bool close ;
+ bool exit ;
+ bool faultTolerant ;
+ bool resume ;
+ bool suspend ;
+
+public:
+ const static unsigned char TYPE = 18;
+
+public:
+ ConnectionControl() ;
+ virtual ~ConnectionControl() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual bool getClose() ;
+ virtual void setClose(bool close) ;
+
+ virtual bool getExit() ;
+ virtual void setExit(bool exit) ;
+
+ virtual bool getFaultTolerant() ;
+ virtual void setFaultTolerant(bool faultTolerant) ;
+
+ virtual bool getResume() ;
+ virtual void setResume(bool resume) ;
+
+ virtual bool getSuspend() ;
+ virtual void setSuspend(bool suspend) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ConnectionControl_hpp_*/
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.cpp Mon May 15 06:38:57 2006
@@ -1,85 +1,83 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "activemq/command/ConnectionError.hpp"
-
-using namespace apache::activemq::command;
-
-/*
- *
- * Marshalling code for Open Wire Format for ConnectionError
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-ConnectionError::ConnectionError()
-{
- this->exception = NULL ;
- this->connectionId = NULL ;
-}
-
-ConnectionError::~ConnectionError()
-{
-}
-
-unsigned char ConnectionError::getDataStructureType()
-{
- return ConnectionError::TYPE ;
-}
-
-
-p<BrokerError> ConnectionError::getException()
-{
- return exception ;
-}
-
-void ConnectionError::setException(p<BrokerError> exception)
-{
- this->exception = exception ;
-}
-
-
-p<ConnectionId> ConnectionError::getConnectionId()
-{
- return connectionId ;
-}
-
-void ConnectionError::setConnectionId(p<ConnectionId> connectionId)
-{
- this->connectionId = connectionId ;
-}
-
-int ConnectionError::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
-{
- int size = 0 ;
-
- size += marshaller->marshalInt(commandId, mode, writer) ;
- size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
- size += marshaller->marshalObject(exception, mode, writer) ;
- size += marshaller->marshalObject(connectionId, mode, writer) ;
- return size ;
-}
-
-void ConnectionError::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
-{
- commandId = marshaller->unmarshalInt(mode, reader) ;
- responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
- exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, reader)) ;
- connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
-}
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/ConnectionError.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionError
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+ConnectionError::ConnectionError()
+{
+ this->exception = NULL ;
+ this->connectionId = NULL ;
+}
+
+ConnectionError::~ConnectionError()
+{
+}
+
+unsigned char ConnectionError::getDataStructureType()
+{
+ return ConnectionError::TYPE ;
+}
+
+
+p<BrokerError> ConnectionError::getException()
+{
+ return exception ;
+}
+
+void ConnectionError::setException(p<BrokerError> exception)
+{
+ this->exception = exception ;
+}
+
+
+p<ConnectionId> ConnectionError::getConnectionId()
+{
+ return connectionId ;
+}
+
+void ConnectionError::setConnectionId(p<ConnectionId> connectionId)
+{
+ this->connectionId = connectionId ;
+}
+
+int ConnectionError::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseCommand::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalObject(exception, mode, ostream) ;
+ size += marshaller->marshalObject(connectionId, mode, ostream) ;
+ return size ;
+}
+
+void ConnectionError::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseCommand::unmarshal(marshaller, mode, istream) ;
+ exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, istream)) ;
+ connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
+}
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionError.hpp Mon May 15 06:38:57 2006
@@ -1,88 +1,89 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef ActiveMQ_ConnectionError_hpp_
-#define ActiveMQ_ConnectionError_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "activemq/command/BaseCommand.hpp"
-#include "activemq/command/BrokerError.hpp"
-#include "activemq/command/ConnectionId.hpp"
-#include "activemq/protocol/IMarshaller.hpp"
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
- using namespace apache::activemq;
- using namespace apache::activemq::protocol;
- using namespace apache::ppr::io;
-
-/*
- *
- * Marshalling code for Open Wire Format for ConnectionError
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-class ConnectionError : public BaseCommand
-{
-protected:
- p<BrokerError> exception ;
- p<ConnectionId> connectionId ;
-
-public:
- const static unsigned char TYPE = 16;
-
-public:
- ConnectionError() ;
- virtual ~ConnectionError() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual p<BrokerError> getException() ;
- virtual void setException(p<BrokerError> exception) ;
-
- virtual p<ConnectionId> getConnectionId() ;
- virtual void setConnectionId(p<ConnectionId> connectionId) ;
-
- virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
- virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ConnectionError_hpp_*/
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef ActiveMQ_ConnectionError_hpp_
+#define ActiveMQ_ConnectionError_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "activemq/command/BaseCommand.hpp"
+#include "activemq/command/BrokerError.hpp"
+#include "activemq/command/ConnectionId.hpp"
+
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionError
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+class ConnectionError : public BaseCommand
+{
+protected:
+ p<BrokerError> exception ;
+ p<ConnectionId> connectionId ;
+
+public:
+ const static unsigned char TYPE = 16;
+
+public:
+ ConnectionError() ;
+ virtual ~ConnectionError() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual p<BrokerError> getException() ;
+ virtual void setException(p<BrokerError> exception) ;
+
+ virtual p<ConnectionId> getConnectionId() ;
+ virtual void setConnectionId(p<ConnectionId> connectionId) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ConnectionError_hpp_*/
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.cpp Mon May 15 06:38:57 2006
@@ -1,67 +1,69 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "activemq/command/ConnectionId.hpp"
-
-using namespace apache::activemq::command;
-
-/*
- *
- * Marshalling code for Open Wire Format for ConnectionId
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-ConnectionId::ConnectionId()
-{
- this->value = NULL ;
-}
-
-ConnectionId::~ConnectionId()
-{
-}
-
-unsigned char ConnectionId::getDataStructureType()
-{
- return ConnectionId::TYPE ;
-}
-
-
-p<string> ConnectionId::getValue()
-{
- return value ;
-}
-
-void ConnectionId::setValue(p<string> value)
-{
- this->value = value ;
-}
-
-int ConnectionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
-{
- int size = 0 ;
-
- size += marshaller->marshalString(value, mode, writer) ;
- return size ;
-}
-
-void ConnectionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
-{
- value = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
-}
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/ConnectionId.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionId
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+ConnectionId::ConnectionId()
+{
+ this->value = NULL ;
+}
+
+ConnectionId::~ConnectionId()
+{
+}
+
+unsigned char ConnectionId::getDataStructureType()
+{
+ return ConnectionId::TYPE ;
+}
+
+
+p<string> ConnectionId::getValue()
+{
+ return value ;
+}
+
+void ConnectionId::setValue(p<string> value)
+{
+ this->value = value ;
+}
+
+int ConnectionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalString(value, mode, ostream) ;
+ return size ;
+}
+
+void ConnectionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseDataStructure::unmarshal(marshaller, mode, istream) ;
+ value = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+}
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.hpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionId.hpp Mon May 15 06:38:57 2006
@@ -1,82 +1,83 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#ifndef ActiveMQ_ConnectionId_hpp_
-#define ActiveMQ_ConnectionId_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <string>
-#include "activemq/command/AbstractCommand.hpp"
-#include "activemq/protocol/IMarshaller.hpp"
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
- using namespace apache::activemq;
- using namespace apache::activemq::protocol;
- using namespace apache::ppr::io;
-
-/*
- *
- * Marshalling code for Open Wire Format for ConnectionId
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-class ConnectionId : public AbstractCommand
-{
-protected:
- p<string> value ;
-
-public:
- const static unsigned char TYPE = 120;
-
-public:
- ConnectionId() ;
- virtual ~ConnectionId() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual p<string> getValue() ;
- virtual void setValue(p<string> value) ;
-
- virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
- virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ConnectionId_hpp_*/
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef ActiveMQ_ConnectionId_hpp_
+#define ActiveMQ_ConnectionId_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <string>
+#include "activemq/command/BaseDataStructure.hpp"
+
+#include "activemq/protocol/IMarshaller.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::ppr::io;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionId
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+class ConnectionId : public BaseDataStructure
+{
+protected:
+ p<string> value ;
+
+public:
+ const static unsigned char TYPE = 120;
+
+public:
+ ConnectionId() ;
+ virtual ~ConnectionId() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual p<string> getValue() ;
+ virtual void setValue(p<string> value) ;
+
+ virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
+ virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ConnectionId_hpp_*/
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.cpp?rev=406628&r1=406627&r2=406628&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.cpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ConnectionInfo.cpp Mon May 15 06:38:57 2006
@@ -1,127 +1,153 @@
-/*
-* Copyright 2006 The Apache Software Foundation or its licensors, as
-* applicable.
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-#include "activemq/command/ConnectionInfo.hpp"
-
-using namespace apache::activemq::command;
-
-/*
- *
- * Marshalling code for Open Wire Format for ConnectionInfo
- *
- *
- * NOTE!: This file is autogenerated - do not modify!
- * if you need to make a change, please see the Groovy scripts in the
- * activemq-core module
- *
- */
-ConnectionInfo::ConnectionInfo()
-{
- this->connectionId = NULL ;
- this->clientId = NULL ;
- this->password = NULL ;
- this->userName = NULL ;
- this->brokerPath = NULL ;
-}
-
-ConnectionInfo::~ConnectionInfo()
-{
-}
-
-unsigned char ConnectionInfo::getDataStructureType()
-{
- return ConnectionInfo::TYPE ;
-}
-
-
-p<ConnectionId> ConnectionInfo::getConnectionId()
-{
- return connectionId ;
-}
-
-void ConnectionInfo::setConnectionId(p<ConnectionId> connectionId)
-{
- this->connectionId = connectionId ;
-}
-
-
-p<string> ConnectionInfo::getClientId()
-{
- return clientId ;
-}
-
-void ConnectionInfo::setClientId(p<string> clientId)
-{
- this->clientId = clientId ;
-}
-
-
-p<string> ConnectionInfo::getPassword()
-{
- return password ;
-}
-
-void ConnectionInfo::setPassword(p<string> password)
-{
- this->password = password ;
-}
-
-
-p<string> ConnectionInfo::getUserName()
-{
- return userName ;
-}
-
-void ConnectionInfo::setUserName(p<string> userName)
-{
- this->userName = userName ;
-}
-
-
-array<BrokerId> ConnectionInfo::getBrokerPath()
-{
- return brokerPath ;
-}
-
-void ConnectionInfo::setBrokerPath(array<BrokerId> brokerPath)
-{
- this->brokerPath = brokerPath ;
-}
-
-int ConnectionInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
-{
- int size = 0 ;
-
- size += marshaller->marshalInt(commandId, mode, writer) ;
- size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
- size += marshaller->marshalObject(connectionId, mode, writer) ;
- size += marshaller->marshalString(clientId, mode, writer) ;
- size += marshaller->marshalString(password, mode, writer) ;
- size += marshaller->marshalString(userName, mode, writer) ;
- size += marshaller->marshalObjectArray(brokerPath, mode, writer) ;
- return size ;
-}
-
-void ConnectionInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
-{
- commandId = marshaller->unmarshalInt(mode, reader) ;
- responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
- connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
- clientId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
- password = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
- userName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
- brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, reader)) ;
-}
+/*
+* Copyright 2006 The Apache Software Foundation or its licensors, as
+* applicable.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#include "activemq/command/ConnectionInfo.hpp"
+
+using namespace apache::activemq::command;
+
+/*
+ *
+ * Command and marshalling code for OpenWire format for ConnectionInfo
+ *
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Groovy scripts in the
+ * activemq-core module
+ *
+ */
+ConnectionInfo::ConnectionInfo()
+{
+ this->connectionId = NULL ;
+ this->clientId = NULL ;
+ this->password = NULL ;
+ this->userName = NULL ;
+ this->brokerPath = NULL ;
+ this->brokerMasterConnector = false ;
+ this->manageable = false ;
+}
+
+ConnectionInfo::~ConnectionInfo()
+{
+}
+
+unsigned char ConnectionInfo::getDataStructureType()
+{
+ return ConnectionInfo::TYPE ;
+}
+
+
+p<ConnectionId> ConnectionInfo::getConnectionId()
+{
+ return connectionId ;
+}
+
+void ConnectionInfo::setConnectionId(p<ConnectionId> connectionId)
+{
+ this->connectionId = connectionId ;
+}
+
+
+p<string> ConnectionInfo::getClientId()
+{
+ return clientId ;
+}
+
+void ConnectionInfo::setClientId(p<string> clientId)
+{
+ this->clientId = clientId ;
+}
+
+
+p<string> ConnectionInfo::getPassword()
+{
+ return password ;
+}
+
+void ConnectionInfo::setPassword(p<string> password)
+{
+ this->password = password ;
+}
+
+
+p<string> ConnectionInfo::getUserName()
+{
+ return userName ;
+}
+
+void ConnectionInfo::setUserName(p<string> userName)
+{
+ this->userName = userName ;
+}
+
+
+array<BrokerId> ConnectionInfo::getBrokerPath()
+{
+ return brokerPath ;
+}
+
+void ConnectionInfo::setBrokerPath(array<BrokerId> brokerPath)
+{
+ this->brokerPath = brokerPath ;
+}
+
+
+bool ConnectionInfo::getBrokerMasterConnector()
+{
+ return brokerMasterConnector ;
+}
+
+void ConnectionInfo::setBrokerMasterConnector(bool brokerMasterConnector)
+{
+ this->brokerMasterConnector = brokerMasterConnector ;
+}
+
+
+bool ConnectionInfo::getManageable()
+{
+ return manageable ;
+}
+
+void ConnectionInfo::setManageable(bool manageable)
+{
+ this->manageable = manageable ;
+}
+
+int ConnectionInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
+{
+ int size = 0 ;
+
+ size += BaseCommand::marshal(marshaller, mode, ostream) ;
+ size += marshaller->marshalObject(connectionId, mode, ostream) ;
+ size += marshaller->marshalString(clientId, mode, ostream) ;
+ size += marshaller->marshalString(password, mode, ostream) ;
+ size += marshaller->marshalString(userName, mode, ostream) ;
+ size += marshaller->marshalObjectArray(brokerPath, mode, ostream) ;
+ size += marshaller->marshalBoolean(brokerMasterConnector, mode, ostream) ;
+ size += marshaller->marshalBoolean(manageable, mode, ostream) ;
+ return size ;
+}
+
+void ConnectionInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
+{
+ BaseCommand::unmarshal(marshaller, mode, istream) ;
+ connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
+ clientId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+ password = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+ userName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
+ brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, istream)) ;
+ brokerMasterConnector = (marshaller->unmarshalBoolean(mode, istream)) ;
+ manageable = (marshaller->unmarshalBoolean(mode, istream)) ;
+}