You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/07/06 00:36:42 UTC
svn commit: r419371 [2/10] - in
/incubator/activemq/trunk/openwire-cpp/src/main/cpp: activemq/
activemq/command/ activemq/protocol/ activemq/protocol/openwire/
activemq/transport/ activemq/transport/tcp/ cms/ ppr/ ppr/io/
ppr/io/encoding/ ppr/net/ ppr/...
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageProducer.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageProducer.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageProducer.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageProducer.hpp Wed Jul 5 15:36:36 2006
@@ -1,91 +1,91 @@
-/*
- * 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_MessageProducer_hpp_
-#define ActiveMQ_MessageProducer_hpp_
-
-#include <string>
-#include "cms/IDestination.hpp"
-#include "cms/IMessage.hpp"
-#include "cms/IMessageProducer.hpp"
-#include "activemq/command/ProducerInfo.hpp"
-#include "ppr/thread/SimpleMutex.hpp"
-#include "ppr/util/Time.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- using namespace ifr;
- using namespace apache::cms;
- using namespace apache::activemq::command;
- using namespace apache::ppr;
- using namespace apache::ppr::thread;
- class Session ;
-
-/*
- *
- */
-class MessageProducer : public IMessageProducer
-{
-private:
- p<Session> session ;
- p<ProducerInfo> producerInfo ;
- SimpleMutex mutex ;
- int priority ;
- long long messageCounter,
- timeToLive ;
- bool closed,
- persistent,
- disableMessageID,
- disableMessageTimestamp ;
-
- // Default message values
- const static char DEFAULT_PRIORITY = 4 ;
- const static long long DEFAULT_TIMETOLIVE = 0 ;
-
-public:
- MessageProducer(p<Session> session, p<ProducerInfo> producerInfo) ;
- virtual ~MessageProducer() ;
-
- // Attribute methods
- virtual bool getPersistent() ;
- virtual void setPersistent(bool persistent) ;
- virtual long long getTimeToLive() ;
- virtual void getTimeToLive(long long ttl) ;
- virtual int getPriority() ;
- virtual void getPriority(int priority) ;
- virtual bool getDisableMessageID() ;
- virtual void getDisableMessageID(bool disable) ;
- virtual bool getDisableMessageTimestamp() ;
- virtual void getDisableMessageTimestamp(bool disable) ;
-
- // Operation methods
- virtual void send(p<IMessage> message) ;
- virtual void send(p<IDestination> destination, p<IMessage> message) ;
- virtual void send(p<IDestination> destination, p<IMessage> message, char priority, long long timeToLive) ;
- virtual void close() ;
-
-private:
- long long getCurrentTimeMillis() ;
-} ;
-
-/* namespace */
- }
-}
-
-#endif /*ActiveMQ_MessageProducer_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_MessageProducer_hpp_
+#define ActiveMQ_MessageProducer_hpp_
+
+#include <string>
+#include "cms/IDestination.hpp"
+#include "cms/IMessage.hpp"
+#include "cms/IMessageProducer.hpp"
+#include "activemq/command/ProducerInfo.hpp"
+#include "ppr/thread/SimpleMutex.hpp"
+#include "ppr/util/Time.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ using namespace ifr;
+ using namespace apache::cms;
+ using namespace apache::activemq::command;
+ using namespace apache::ppr;
+ using namespace apache::ppr::thread;
+ class Session ;
+
+/*
+ *
+ */
+class MessageProducer : public IMessageProducer
+{
+private:
+ p<Session> session ;
+ p<ProducerInfo> producerInfo ;
+ SimpleMutex mutex ;
+ int priority ;
+ long long messageCounter,
+ timeToLive ;
+ bool closed,
+ persistent,
+ disableMessageID,
+ disableMessageTimestamp ;
+
+ // Default message values
+ const static char DEFAULT_PRIORITY = 4 ;
+ const static long long DEFAULT_TIMETOLIVE = 0 ;
+
+public:
+ MessageProducer(p<Session> session, p<ProducerInfo> producerInfo) ;
+ virtual ~MessageProducer() ;
+
+ // Attribute methods
+ virtual bool getPersistent() ;
+ virtual void setPersistent(bool persistent) ;
+ virtual long long getTimeToLive() ;
+ virtual void getTimeToLive(long long ttl) ;
+ virtual int getPriority() ;
+ virtual void getPriority(int priority) ;
+ virtual bool getDisableMessageID() ;
+ virtual void getDisableMessageID(bool disable) ;
+ virtual bool getDisableMessageTimestamp() ;
+ virtual void getDisableMessageTimestamp(bool disable) ;
+
+ // Operation methods
+ virtual void send(p<IMessage> message) ;
+ virtual void send(p<IDestination> destination, p<IMessage> message) ;
+ virtual void send(p<IDestination> destination, p<IMessage> message, char priority, long long timeToLive) ;
+ virtual void close() ;
+
+private:
+ long long getCurrentTimeMillis() ;
+} ;
+
+/* namespace */
+ }
+}
+
+#endif /*ActiveMQ_MessageProducer_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/MessageProducer.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp Wed Jul 5 15:36:36 2006
@@ -1,168 +1,168 @@
-/*
- * 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_Session_hpp_
-#define ActiveMQ_Session_hpp_
-
-#include <string>
-#include <map>
-#include "activemq/AcknowledgementMode.hpp"
-#include "cms/IMessage.hpp"
-#include "cms/IBytesMessage.hpp"
-#include "cms/IMapMessage.hpp"
-#include "cms/ITextMessage.hpp"
-#include "cms/ISession.hpp"
-#include "cms/CmsException.hpp"
-#include "activemq/IDataStructure.hpp"
-#include "activemq/MessageConsumer.hpp"
-#include "activemq/MessageProducer.hpp"
-#include "activemq/TransactionContext.hpp"
-#include "activemq/command/ConsumerInfo.hpp"
-#include "activemq/command/ProducerInfo.hpp"
-#include "activemq/command/RemoveInfo.hpp"
-#include "activemq/command/SessionInfo.hpp"
-#include "activemq/command/SessionId.hpp"
-#include "ppr/thread/SimpleMutex.hpp"
-#include "ppr/thread/Semaphore.hpp"
-#include "ppr/thread/Thread.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- using namespace ifr;
- using namespace apache::cms;
- using namespace apache::ppr::thread;
- using namespace apache::ppr::util;
- class Connection;
- class DispatchThread;
-
-/*
- *
- */
-class Session : public ISession
-{
-private:
- p<Connection> connection ;
- p<SessionInfo> sessionInfo ;
- AcknowledgementMode ackMode ;
- p<TransactionContext> transactionContext ;
- p<DispatchThread> dispatchThread ;
- map<long long, p<MessageConsumer> > consumers ;
- map<long long, p<MessageProducer> > producers ;
- SimpleMutex mutex ;
- long consumerCounter,
- producerCounter ;
- int prefetchSize ;
- bool closed ;
-
-public:
- Session(p<Connection> connection, p<SessionInfo> sessionInfo, AcknowledgementMode ackMode) ;
- virtual ~Session() ;
-
- // Attribute methods
- virtual bool isTransacted() ;
- virtual p<Connection> getConnection() ;
- virtual p<SessionId> getSessionId() ;
- virtual p<TransactionContext> getTransactionContext() ;
- virtual p<MessageConsumer> getConsumer(p<ConsumerId> consumerId) ;
- virtual p<MessageProducer> getProducer(p<ProducerId> producerId) ;
-
- // Operation methods
- virtual void commit() throw(CmsException) ;
- virtual void rollback() throw(CmsException) ;
- virtual p<IMessageProducer> createProducer() ;
- virtual p<IMessageProducer> createProducer(p<IDestination> destination) ;
- virtual p<IMessageConsumer> createConsumer(p<IDestination> destination) ;
- virtual p<IMessageConsumer> createConsumer(p<IDestination> destination, const char* selector) ;
- virtual p<IMessageConsumer> createDurableConsumer(p<ITopic> destination, const char* name, const char* selector, bool noLocal) ;
- virtual p<IQueue> getQueue(const char* name) ;
- virtual p<ITopic> getTopic(const char* name) ;
- virtual p<ITemporaryQueue> createTemporaryQueue() ;
- virtual p<ITemporaryTopic> createTemporaryTopic() ;
- virtual p<IMessage> createMessage() ;
- virtual p<IBytesMessage> createBytesMessage() ;
- virtual p<IBytesMessage> createBytesMessage(char* body, int size) ;
- virtual p<IMapMessage> createMapMessage() ;
- virtual p<ITextMessage> createTextMessage() ;
- virtual p<ITextMessage> createTextMessage(const char* text) ;
-
- virtual void doSend(p<IDestination> destination, p<IMessage> message) ;
- virtual void doStartTransaction() ;
- virtual void dispatch(int delay = 0) ;
- virtual void dispatchAsyncMessages() ;
- virtual void close() ;
-
-protected:
- // Implementation methods
- p<ConsumerInfo> createConsumerInfo(p<IDestination> destination, const char* selector) ;
- p<ProducerInfo> createProducerInfo(p<IDestination> destination) ;
- void configure(p<IMessage> message) ;
-} ;
-
-/*
- *
- */
-class DispatchThread : public Thread
-{
-public:
- p<Session> session ;
- Semaphore semaphore ;
- bool interrupted ;
-
- DispatchThread(p<Session> session)
- {
- this->session = session ;
- this->interrupted = false ;
- }
-
- void interrupt()
- {
- interrupted = true ;
- wakeup() ;
- }
-
- void wakeup()
- {
- semaphore.notify() ;
- }
-
-protected:
- virtual void run () throw (p<exception>)
- {
- do
- {
- // Wait for wake-up call
- semaphore.wait() ;
-
- if( interrupted )
- break ;
-
- session->dispatchAsyncMessages() ;
- } while( !interrupted ) ;
-
- // Clean up (prevent cyclic dependency)
- session = NULL ;
- }
-} ;
-
-/* namespace */
- }
-}
-
-#endif /*ActiveMQ_Session_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_Session_hpp_
+#define ActiveMQ_Session_hpp_
+
+#include <string>
+#include <map>
+#include "activemq/AcknowledgementMode.hpp"
+#include "cms/IMessage.hpp"
+#include "cms/IBytesMessage.hpp"
+#include "cms/IMapMessage.hpp"
+#include "cms/ITextMessage.hpp"
+#include "cms/ISession.hpp"
+#include "cms/CmsException.hpp"
+#include "activemq/IDataStructure.hpp"
+#include "activemq/MessageConsumer.hpp"
+#include "activemq/MessageProducer.hpp"
+#include "activemq/TransactionContext.hpp"
+#include "activemq/command/ConsumerInfo.hpp"
+#include "activemq/command/ProducerInfo.hpp"
+#include "activemq/command/RemoveInfo.hpp"
+#include "activemq/command/SessionInfo.hpp"
+#include "activemq/command/SessionId.hpp"
+#include "ppr/thread/SimpleMutex.hpp"
+#include "ppr/thread/Semaphore.hpp"
+#include "ppr/thread/Thread.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ using namespace ifr;
+ using namespace apache::cms;
+ using namespace apache::ppr::thread;
+ using namespace apache::ppr::util;
+ class Connection;
+ class DispatchThread;
+
+/*
+ *
+ */
+class Session : public ISession
+{
+private:
+ p<Connection> connection ;
+ p<SessionInfo> sessionInfo ;
+ AcknowledgementMode ackMode ;
+ p<TransactionContext> transactionContext ;
+ p<DispatchThread> dispatchThread ;
+ map<long long, p<MessageConsumer> > consumers ;
+ map<long long, p<MessageProducer> > producers ;
+ SimpleMutex mutex ;
+ long consumerCounter,
+ producerCounter ;
+ int prefetchSize ;
+ bool closed ;
+
+public:
+ Session(p<Connection> connection, p<SessionInfo> sessionInfo, AcknowledgementMode ackMode) ;
+ virtual ~Session() ;
+
+ // Attribute methods
+ virtual bool isTransacted() ;
+ virtual p<Connection> getConnection() ;
+ virtual p<SessionId> getSessionId() ;
+ virtual p<TransactionContext> getTransactionContext() ;
+ virtual p<MessageConsumer> getConsumer(p<ConsumerId> consumerId) ;
+ virtual p<MessageProducer> getProducer(p<ProducerId> producerId) ;
+
+ // Operation methods
+ virtual void commit() throw(CmsException) ;
+ virtual void rollback() throw(CmsException) ;
+ virtual p<IMessageProducer> createProducer() ;
+ virtual p<IMessageProducer> createProducer(p<IDestination> destination) ;
+ virtual p<IMessageConsumer> createConsumer(p<IDestination> destination) ;
+ virtual p<IMessageConsumer> createConsumer(p<IDestination> destination, const char* selector) ;
+ virtual p<IMessageConsumer> createDurableConsumer(p<ITopic> destination, const char* name, const char* selector, bool noLocal) ;
+ virtual p<IQueue> getQueue(const char* name) ;
+ virtual p<ITopic> getTopic(const char* name) ;
+ virtual p<ITemporaryQueue> createTemporaryQueue() ;
+ virtual p<ITemporaryTopic> createTemporaryTopic() ;
+ virtual p<IMessage> createMessage() ;
+ virtual p<IBytesMessage> createBytesMessage() ;
+ virtual p<IBytesMessage> createBytesMessage(char* body, int size) ;
+ virtual p<IMapMessage> createMapMessage() ;
+ virtual p<ITextMessage> createTextMessage() ;
+ virtual p<ITextMessage> createTextMessage(const char* text) ;
+
+ virtual void doSend(p<IDestination> destination, p<IMessage> message) ;
+ virtual void doStartTransaction() ;
+ virtual void dispatch(int delay = 0) ;
+ virtual void dispatchAsyncMessages() ;
+ virtual void close() ;
+
+protected:
+ // Implementation methods
+ p<ConsumerInfo> createConsumerInfo(p<IDestination> destination, const char* selector) ;
+ p<ProducerInfo> createProducerInfo(p<IDestination> destination) ;
+ void configure(p<IMessage> message) ;
+} ;
+
+/*
+ *
+ */
+class DispatchThread : public Thread
+{
+public:
+ p<Session> session ;
+ Semaphore semaphore ;
+ bool interrupted ;
+
+ DispatchThread(p<Session> session)
+ {
+ this->session = session ;
+ this->interrupted = false ;
+ }
+
+ void interrupt()
+ {
+ interrupted = true ;
+ wakeup() ;
+ }
+
+ void wakeup()
+ {
+ semaphore.notify() ;
+ }
+
+protected:
+ virtual void run () throw (p<exception>)
+ {
+ do
+ {
+ // Wait for wake-up call
+ semaphore.wait() ;
+
+ if( interrupted )
+ break ;
+
+ session->dispatchAsyncMessages() ;
+ } while( !interrupted ) ;
+
+ // Clean up (prevent cyclic dependency)
+ session = NULL ;
+ }
+} ;
+
+/* namespace */
+ }
+}
+
+#endif /*ActiveMQ_Session_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/Session.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionContext.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionContext.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionContext.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionContext.hpp Wed Jul 5 15:36:36 2006
@@ -1,61 +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_TransactionContext_hpp_
-#define ActiveMQ_TransactionContext_hpp_
-
-#include <list>
-#include "activemq/ISynchronization.hpp"
-#include "activemq/Connection.hpp"
-#include "activemq/TransactionType.hpp"
-#include "activemq/command/TransactionId.hpp"
-#include "activemq/command/TransactionInfo.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- using namespace ifr;
- using namespace apache::activemq::command;
- class Session;
-
-/*
- *
- */
-class TransactionContext
-{
-private:
- p<TransactionId> transactionId ;
- p<Session> session ;
- list< p<ISynchronization> > synchronizations ;
-
-public:
- TransactionContext(p<Session> session) ;
- virtual ~TransactionContext() ;
-
- virtual p<TransactionId> getTransactionId() ;
- virtual void addSynchronization(p<ISynchronization> synchronization) ;
- virtual void begin() ;
- virtual void commit() ;
- virtual void rollback() ;
-} ;
-
-/* namespace */
- }
-}
-
-#endif /*ActiveMQ_TransactionContext_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_TransactionContext_hpp_
+#define ActiveMQ_TransactionContext_hpp_
+
+#include <list>
+#include "activemq/ISynchronization.hpp"
+#include "activemq/Connection.hpp"
+#include "activemq/TransactionType.hpp"
+#include "activemq/command/TransactionId.hpp"
+#include "activemq/command/TransactionInfo.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ using namespace ifr;
+ using namespace apache::activemq::command;
+ class Session;
+
+/*
+ *
+ */
+class TransactionContext
+{
+private:
+ p<TransactionId> transactionId ;
+ p<Session> session ;
+ list< p<ISynchronization> > synchronizations ;
+
+public:
+ TransactionContext(p<Session> session) ;
+ virtual ~TransactionContext() ;
+
+ virtual p<TransactionId> getTransactionId() ;
+ virtual void addSynchronization(p<ISynchronization> synchronization) ;
+ virtual void begin() ;
+ virtual void commit() ;
+ virtual void rollback() ;
+} ;
+
+/* namespace */
+ }
+}
+
+#endif /*ActiveMQ_TransactionContext_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionContext.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionType.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionType.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionType.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionType.hpp Wed Jul 5 15:36:36 2006
@@ -1,38 +1,38 @@
-/*
- * 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_TransactionType_hpp_
-#define ActiveMQ_TransactionType_hpp_
-
-namespace apache
-{
- namespace activemq
- {
- enum TransactionType
- {
- BeginTx = 0,
- PrepareTx = 1,
- CommitOnePhaseTx = 2,
- CommitTwoPhaseTx = 3,
- RollbackTx = 4,
- RecoverTx = 5,
- ForgetTx = 6,
- EndTx = 7
- };
- }
-}
-
-#endif /*ActiveMQ_TransactionType_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_TransactionType_hpp_
+#define ActiveMQ_TransactionType_hpp_
+
+namespace apache
+{
+ namespace activemq
+ {
+ enum TransactionType
+ {
+ BeginTx = 0,
+ PrepareTx = 1,
+ CommitOnePhaseTx = 2,
+ CommitTwoPhaseTx = 3,
+ RollbackTx = 4,
+ RecoverTx = 5,
+ ForgetTx = 6,
+ EndTx = 7
+ };
+ }
+}
+
+#endif /*ActiveMQ_TransactionType_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/TransactionType.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp Wed Jul 5 15:36:36 2006
@@ -1,185 +1,185 @@
-/*
- * 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_ActiveMQBytesMessage_hpp_
-#define ActiveMQ_ActiveMQBytesMessage_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <map>
-#include <string>
-#include "cms/IBytesMessage.hpp"
-#include "cms/MessageEOFException.hpp"
-#include "cms/MessageNotWritableException.hpp"
-#include "activemq/command/ActiveMQMessage.hpp"
-#include "ppr/io/ByteArrayInputStream.hpp"
-#include "ppr/io/ByteArrayOutputStream.hpp"
-#include "ppr/io/DataInputStream.hpp"
-#include "ppr/io/DataOutputStream.hpp"
-#include "ppr/io/EOFException.hpp"
-#include "ppr/util/Endian.hpp"
-#include "ppr/util/MapItemHolder.hpp"
-#include "ppr/util/ifr/array"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace apache::cms;
- using namespace apache::ppr::io;
- using namespace apache::ppr::util;
-
-/*
- *
- */
-class ActiveMQBytesMessage : public ActiveMQMessage , public IBytesMessage
-{
-private:
- p<DataInputStream> dis ;
- p<DataOutputStream> dos ;
- p<ByteArrayInputStream> bis ;
- p<ByteArrayOutputStream> bos ;
- bool readMode ;
-
- const static int INITIAL_SIZE = 256 ;
- const static int EXPAND_SIZE = 128 ;
-
-public:
- const static unsigned char TYPE = 24 ;
-
-public:
- ActiveMQBytesMessage() ;
- ActiveMQBytesMessage(char* body, int size) ;
- virtual ~ActiveMQBytesMessage() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual void reset() ;
- virtual char readByte() throw (MessageNotReadableException, MessageEOFException) ;
- virtual int readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException) ;
- virtual bool readBoolean() throw (MessageNotReadableException, MessageEOFException) ;
- virtual double readDouble() throw (MessageNotReadableException, MessageEOFException) ;
- virtual float readFloat() throw (MessageNotReadableException, MessageEOFException) ;
- virtual int readInt() throw (MessageNotReadableException, MessageEOFException) ;
- virtual long long readLong() throw (MessageNotReadableException, MessageEOFException) ;
- virtual short readShort() throw (MessageNotReadableException, MessageEOFException) ;
- virtual p<string> readString() throw (MessageNotReadableException, MessageEOFException) ;
- virtual void writeBoolean(bool value) throw (MessageNotWritableException) ;
- virtual void writeByte(char value) throw (MessageNotWritableException) ;
- virtual void writeBytes(char* value, int offset, int length) throw (MessageNotWritableException) ;
- virtual void writeDouble(double value) throw (MessageNotWritableException) ;
- virtual void writeFloat(float value) throw (MessageNotWritableException) ;
- virtual void writeInt(int value) throw (MessageNotWritableException) ;
- virtual void writeLong(long long value) throw (MessageNotWritableException) ;
- virtual void writeShort(short value) throw (MessageNotWritableException) ;
- virtual void writeString(const char* value) throw (MessageNotWritableException) ;
-
- 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) ;
-
- //
- // The methods below are needed to resolve the multiple
- // inheritance of IMessage.
- virtual void acknowledge() {
- ActiveMQMessage::acknowledge() ;
- } ;
- virtual p<PropertyMap> getProperties() {
- return ActiveMQMessage::getProperties() ;
- } ;
- virtual p<string> getJMSCorrelationID() {
- return ActiveMQMessage::getJMSCorrelationID() ;
- } ;
- virtual void setJMSCorrelationID(const char* correlationId) {
- return ActiveMQMessage::setJMSCorrelationID(correlationId) ;
- } ;
- virtual p<IDestination> getJMSDestination() {
- return ActiveMQMessage::getJMSDestination() ;
- } ;
- virtual long long getJMSExpiration() {
- return ActiveMQMessage::getJMSExpiration() ;
- } ;
- virtual void setJMSExpiration(long long time) {
- return ActiveMQMessage::setJMSExpiration(time) ;
- } ;
- virtual p<string> getJMSMessageID() {
- return ActiveMQMessage::getJMSMessageID() ;
- } ;
- virtual bool getJMSPersistent() {
- return ActiveMQMessage::getJMSPersistent() ;
- } ;
- virtual void setJMSPersistent(bool persistent) {
- return ActiveMQMessage::setJMSPersistent(persistent) ;
- } ;
- virtual unsigned char getJMSPriority() {
- return ActiveMQMessage::getJMSPriority() ;
- } ;
- virtual void setJMSPriority(unsigned char priority) {
- return ActiveMQMessage::setJMSPriority(priority) ;
- } ;
- virtual bool getJMSRedelivered() {
- return ActiveMQMessage::getJMSRedelivered() ;
- } ;
- virtual p<IDestination> getJMSReplyTo() {
- return ActiveMQMessage::getJMSReplyTo() ;
- } ;
- virtual void setJMSReplyTo(p<IDestination> destination) {
- return ActiveMQMessage::setJMSReplyTo(destination) ;
- } ;
- virtual long long getJMSTimestamp() {
- return ActiveMQMessage::getJMSTimestamp() ;
- } ;
- virtual p<string> getJMSType() {
- return ActiveMQMessage::getJMSType() ;
- } ;
- virtual void setJMSType(const char* type) {
- return ActiveMQMessage::setJMSType(type) ;
- } ;
- virtual int getJMSXDeliveryCount() {
- return ActiveMQMessage::getJMSXDeliveryCount() ;
- } ;
- virtual p<string> getJMSXGroupID() {
- return ActiveMQMessage::getJMSXGroupID() ;
- } ;
- virtual void setJMSXGroupID(const char* groupId) {
- return ActiveMQMessage::setJMSXGroupID(groupId) ;
- } ;
- virtual int getJMSXGroupSeq() {
- return ActiveMQMessage::getJMSXGroupSeq() ;
- } ;
- virtual void setJMSXGroupSeq(int sequence) {
- return ActiveMQMessage::setJMSXGroupSeq(sequence) ;
- } ;
- virtual p<string> getJMSXProducerTxID() {
- return ActiveMQMessage::getJMSXProducerTxID() ;
- } ;
-
-//private:
- // void expandBody() ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQBytesMessage_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_ActiveMQBytesMessage_hpp_
+#define ActiveMQ_ActiveMQBytesMessage_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <map>
+#include <string>
+#include "cms/IBytesMessage.hpp"
+#include "cms/MessageEOFException.hpp"
+#include "cms/MessageNotWritableException.hpp"
+#include "activemq/command/ActiveMQMessage.hpp"
+#include "ppr/io/ByteArrayInputStream.hpp"
+#include "ppr/io/ByteArrayOutputStream.hpp"
+#include "ppr/io/DataInputStream.hpp"
+#include "ppr/io/DataOutputStream.hpp"
+#include "ppr/io/EOFException.hpp"
+#include "ppr/util/Endian.hpp"
+#include "ppr/util/MapItemHolder.hpp"
+#include "ppr/util/ifr/array"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace apache::cms;
+ using namespace apache::ppr::io;
+ using namespace apache::ppr::util;
+
+/*
+ *
+ */
+class ActiveMQBytesMessage : public ActiveMQMessage , public IBytesMessage
+{
+private:
+ p<DataInputStream> dis ;
+ p<DataOutputStream> dos ;
+ p<ByteArrayInputStream> bis ;
+ p<ByteArrayOutputStream> bos ;
+ bool readMode ;
+
+ const static int INITIAL_SIZE = 256 ;
+ const static int EXPAND_SIZE = 128 ;
+
+public:
+ const static unsigned char TYPE = 24 ;
+
+public:
+ ActiveMQBytesMessage() ;
+ ActiveMQBytesMessage(char* body, int size) ;
+ virtual ~ActiveMQBytesMessage() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual void reset() ;
+ virtual char readByte() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual int readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException) ;
+ virtual bool readBoolean() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual double readDouble() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual float readFloat() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual int readInt() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual long long readLong() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual short readShort() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual p<string> readString() throw (MessageNotReadableException, MessageEOFException) ;
+ virtual void writeBoolean(bool value) throw (MessageNotWritableException) ;
+ virtual void writeByte(char value) throw (MessageNotWritableException) ;
+ virtual void writeBytes(char* value, int offset, int length) throw (MessageNotWritableException) ;
+ virtual void writeDouble(double value) throw (MessageNotWritableException) ;
+ virtual void writeFloat(float value) throw (MessageNotWritableException) ;
+ virtual void writeInt(int value) throw (MessageNotWritableException) ;
+ virtual void writeLong(long long value) throw (MessageNotWritableException) ;
+ virtual void writeShort(short value) throw (MessageNotWritableException) ;
+ virtual void writeString(const char* value) throw (MessageNotWritableException) ;
+
+ 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) ;
+
+ //
+ // The methods below are needed to resolve the multiple
+ // inheritance of IMessage.
+ virtual void acknowledge() {
+ ActiveMQMessage::acknowledge() ;
+ } ;
+ virtual p<PropertyMap> getProperties() {
+ return ActiveMQMessage::getProperties() ;
+ } ;
+ virtual p<string> getJMSCorrelationID() {
+ return ActiveMQMessage::getJMSCorrelationID() ;
+ } ;
+ virtual void setJMSCorrelationID(const char* correlationId) {
+ return ActiveMQMessage::setJMSCorrelationID(correlationId) ;
+ } ;
+ virtual p<IDestination> getJMSDestination() {
+ return ActiveMQMessage::getJMSDestination() ;
+ } ;
+ virtual long long getJMSExpiration() {
+ return ActiveMQMessage::getJMSExpiration() ;
+ } ;
+ virtual void setJMSExpiration(long long time) {
+ return ActiveMQMessage::setJMSExpiration(time) ;
+ } ;
+ virtual p<string> getJMSMessageID() {
+ return ActiveMQMessage::getJMSMessageID() ;
+ } ;
+ virtual bool getJMSPersistent() {
+ return ActiveMQMessage::getJMSPersistent() ;
+ } ;
+ virtual void setJMSPersistent(bool persistent) {
+ return ActiveMQMessage::setJMSPersistent(persistent) ;
+ } ;
+ virtual unsigned char getJMSPriority() {
+ return ActiveMQMessage::getJMSPriority() ;
+ } ;
+ virtual void setJMSPriority(unsigned char priority) {
+ return ActiveMQMessage::setJMSPriority(priority) ;
+ } ;
+ virtual bool getJMSRedelivered() {
+ return ActiveMQMessage::getJMSRedelivered() ;
+ } ;
+ virtual p<IDestination> getJMSReplyTo() {
+ return ActiveMQMessage::getJMSReplyTo() ;
+ } ;
+ virtual void setJMSReplyTo(p<IDestination> destination) {
+ return ActiveMQMessage::setJMSReplyTo(destination) ;
+ } ;
+ virtual long long getJMSTimestamp() {
+ return ActiveMQMessage::getJMSTimestamp() ;
+ } ;
+ virtual p<string> getJMSType() {
+ return ActiveMQMessage::getJMSType() ;
+ } ;
+ virtual void setJMSType(const char* type) {
+ return ActiveMQMessage::setJMSType(type) ;
+ } ;
+ virtual int getJMSXDeliveryCount() {
+ return ActiveMQMessage::getJMSXDeliveryCount() ;
+ } ;
+ virtual p<string> getJMSXGroupID() {
+ return ActiveMQMessage::getJMSXGroupID() ;
+ } ;
+ virtual void setJMSXGroupID(const char* groupId) {
+ return ActiveMQMessage::setJMSXGroupID(groupId) ;
+ } ;
+ virtual int getJMSXGroupSeq() {
+ return ActiveMQMessage::getJMSXGroupSeq() ;
+ } ;
+ virtual void setJMSXGroupSeq(int sequence) {
+ return ActiveMQMessage::setJMSXGroupSeq(sequence) ;
+ } ;
+ virtual p<string> getJMSXProducerTxID() {
+ return ActiveMQMessage::getJMSXProducerTxID() ;
+ } ;
+
+//private:
+ // void expandBody() ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQBytesMessage_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQBytesMessage.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp Wed Jul 5 15:36:36 2006
@@ -1,137 +1,137 @@
-/*
- * 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_ActiveMQDestination_hpp_
-#define ActiveMQ_ActiveMQDestination_hpp_
-
-#include <typeinfo>
-#include "cms/IDestination.hpp"
-#include "cms/ITopic.hpp"
-#include "cms/IQueue.hpp"
-#include "cms/ITemporaryTopic.hpp"
-#include "cms/ITemporaryQueue.hpp"
-#include "activemq/command/BaseCommand.hpp"
-#include "activemq/protocol/IMarshaller.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_ActiveMQDestination_hpp_
+#define ActiveMQ_ActiveMQDestination_hpp_
+
+#include <typeinfo>
+#include "cms/IDestination.hpp"
+#include "cms/ITopic.hpp"
+#include "cms/IQueue.hpp"
+#include "cms/ITemporaryTopic.hpp"
+#include "cms/ITemporaryQueue.hpp"
+#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/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
using namespace ifr;
- using namespace apache::activemq;
- using namespace apache::activemq::protocol;
- using namespace apache::cms;
- using namespace apache::ppr::io;
- class ActiveMQQueue ;
- class ActiveMQTempQueue ;
- class ActiveMQTopic ;
- class ActiveMQTempTopic ;
-
-/*
- *
- */
-class ActiveMQDestination : public BaseCommand, public IDestination
-{
-private:
- p<string> orderedTarget,
- physicalName ;
- bool exclusive,
- ordered,
- advisory ;
-
- // Prefix/postfix for queue/topic names
- static const char* TEMP_PREFIX ;
- static const char* TEMP_POSTFIX ;
- static const char* COMPOSITE_SEPARATOR ;
- static const char* QUEUE_PREFIX ;
- static const char* TOPIC_PREFIX ;
-
-public:
- // Destination type constants
- static const int ACTIVEMQ_TOPIC = 1 ;
- static const int ACTIVEMQ_TEMPORARY_TOPIC = 2 ;
- static const int ACTIVEMQ_QUEUE = 3 ;
- static const int ACTIVEMQ_TEMPORARY_QUEUE = 4 ;
-
- // Prefixes for Advisory message destinations
- static const char* ADVISORY_PREFIX ;
- static const char* CONSUMER_ADVISORY_PREFIX ;
- static const char* PRODUCER_ADVISORY_PREFIX ;
- static const char* CONNECTION_ADVISORY_PREFIX ;
-
- // The default target for ordered destinations
- static const char* DEFAULT_ORDERED_TARGET ;
-
-protected:
- ActiveMQDestination() ;
- ActiveMQDestination(const char* name) ;
-
-public:
- virtual ~ActiveMQDestination() ;
-
- // Attributes methods
- virtual bool isAdvisory() ;
- virtual void setAdvisory(bool advisory) ;
- virtual bool isConsumerAdvisory() ;
- virtual bool isProducerAdvisory() ;
- virtual bool isConnectionAdvisory() ;
- virtual bool isExclusive() ;
- virtual void setExclusive(bool exclusive) ;
- virtual bool isOrdered() ;
- virtual void setOrdered(bool ordered) ;
- virtual p<string> getOrderedTarget() ;
- virtual void setOrderedTarget(const char* target) ;
- virtual p<string> getPhysicalName() ;
- virtual void setPhysicalName(const char* name) ;
- virtual bool isTopic() ;
- virtual bool isQueue() ;
- virtual bool isTemporary() ;
- virtual bool isComposite() ;
- virtual bool isWildcard() ;
- virtual p<string> toString() ;
-
+ using namespace apache::activemq;
+ using namespace apache::activemq::protocol;
+ using namespace apache::cms;
+ using namespace apache::ppr::io;
+ class ActiveMQQueue ;
+ class ActiveMQTempQueue ;
+ class ActiveMQTopic ;
+ class ActiveMQTempTopic ;
+
+/*
+ *
+ */
+class ActiveMQDestination : public BaseCommand, public IDestination
+{
+private:
+ p<string> orderedTarget,
+ physicalName ;
+ bool exclusive,
+ ordered,
+ advisory ;
+
+ // Prefix/postfix for queue/topic names
+ static const char* TEMP_PREFIX ;
+ static const char* TEMP_POSTFIX ;
+ static const char* COMPOSITE_SEPARATOR ;
+ static const char* QUEUE_PREFIX ;
+ static const char* TOPIC_PREFIX ;
+
+public:
+ // Destination type constants
+ static const int ACTIVEMQ_TOPIC = 1 ;
+ static const int ACTIVEMQ_TEMPORARY_TOPIC = 2 ;
+ static const int ACTIVEMQ_QUEUE = 3 ;
+ static const int ACTIVEMQ_TEMPORARY_QUEUE = 4 ;
+
+ // Prefixes for Advisory message destinations
+ static const char* ADVISORY_PREFIX ;
+ static const char* CONSUMER_ADVISORY_PREFIX ;
+ static const char* PRODUCER_ADVISORY_PREFIX ;
+ static const char* CONNECTION_ADVISORY_PREFIX ;
+
+ // The default target for ordered destinations
+ static const char* DEFAULT_ORDERED_TARGET ;
+
+protected:
+ ActiveMQDestination() ;
+ ActiveMQDestination(const char* name) ;
+
+public:
+ virtual ~ActiveMQDestination() ;
+
+ // Attributes methods
+ virtual bool isAdvisory() ;
+ virtual void setAdvisory(bool advisory) ;
+ virtual bool isConsumerAdvisory() ;
+ virtual bool isProducerAdvisory() ;
+ virtual bool isConnectionAdvisory() ;
+ virtual bool isExclusive() ;
+ virtual void setExclusive(bool exclusive) ;
+ virtual bool isOrdered() ;
+ virtual void setOrdered(bool ordered) ;
+ virtual p<string> getOrderedTarget() ;
+ virtual void setOrderedTarget(const char* target) ;
+ virtual p<string> getPhysicalName() ;
+ virtual void setPhysicalName(const char* name) ;
+ virtual bool isTopic() ;
+ virtual bool isQueue() ;
+ virtual bool isTemporary() ;
+ virtual bool isComposite() ;
+ virtual bool isWildcard() ;
+ virtual p<string> toString() ;
+
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) ;
-
- //
- // Abstract methods
-
- // Factory method to create a child destination if this destination is a composite.
- virtual p<ActiveMQDestination> createDestination(const char* name) = 0 ;
- virtual int getDestinationType() = 0 ;
-
- //
- // Static methods
-
- static p<string> inspect(p<ActiveMQDestination> destination) ;
- //static p<ActiveMQDestination> transform(p<IDestination> destination) ;
- static p<ActiveMQDestination> createDestination(int type, const char* physicalName) ;
- static p<string> createTemporaryName(const char* clientId) ;
- static p<string> getClientId(p<ActiveMQDestination> destination) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQDestination_hpp_*/
+
+ //
+ // Abstract methods
+
+ // Factory method to create a child destination if this destination is a composite.
+ virtual p<ActiveMQDestination> createDestination(const char* name) = 0 ;
+ virtual int getDestinationType() = 0 ;
+
+ //
+ // Static methods
+
+ static p<string> inspect(p<ActiveMQDestination> destination) ;
+ //static p<ActiveMQDestination> transform(p<IDestination> destination) ;
+ static p<ActiveMQDestination> createDestination(int type, const char* physicalName) ;
+ static p<string> createTemporaryName(const char* clientId) ;
+ static p<string> getClientId(p<ActiveMQDestination> destination) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQDestination_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQDestination.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp Wed Jul 5 15:36:36 2006
@@ -1,175 +1,175 @@
-/*
- * 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_ActiveMQMapMessage_hpp_
-#define ActiveMQ_ActiveMQMapMessage_hpp_
-
-// Turn off warning message for ignored exception specification
-#ifdef _MSC_VER
-#pragma warning( disable : 4290 )
-#endif
-
-#include <map>
-#include <string>
-#include "cms/IMapMessage.hpp"
-#include "cms/MessageFormatException.hpp"
-#include "activemq/command/ActiveMQMessage.hpp"
-#include "ppr/IllegalArgumentException.hpp"
-#include "ppr/io/IOutputStream.hpp"
-#include "ppr/io/IInputStream.hpp"
-#include "ppr/util/MapItemHolder.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::cms;
- using namespace apache::ppr;
- using namespace apache::ppr::io;
- using namespace apache::ppr::util;
-
-/*
- *
- */
-class ActiveMQMapMessage : public ActiveMQMessage, public IMapMessage
-{
-private:
- p<string> text ;
- p<PropertyMap> contentMap ;
-
-public:
- const static unsigned char TYPE = 25 ;
-
-public:
- ActiveMQMapMessage() ;
- virtual ~ActiveMQMapMessage() ;
-
- virtual unsigned char getDataStructureType() ;
-
- virtual p<PropertyMap> getBody() ;
- virtual bool getBoolean(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setBoolean(const char* name, bool value) throw (IllegalArgumentException) ;
- virtual char getByte(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setByte(const char* name, char value) throw (IllegalArgumentException) ;
- virtual array<char> getBytes(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setBytes(const char* name, array<char> value) throw (IllegalArgumentException) ;
- virtual double getDouble(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setDouble(const char* name, double value) throw (IllegalArgumentException) ;
- virtual float getFloat(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setFloat(const char* name, float value) throw (IllegalArgumentException) ;
- virtual int getInt(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setInt(const char* name, int value) throw (IllegalArgumentException) ;
- virtual long long getLong(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setLong(const char* name, long long value) throw (IllegalArgumentException) ;
- virtual short getShort(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setShort(const char* name, short value) throw (IllegalArgumentException) ;
- virtual p<string> getString(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
- virtual void setString(const char* name, const char* value) throw (IllegalArgumentException) ;
- virtual array<string> getMapNames() ;
- virtual bool itemExists(const char* name) ;
-
- 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) ;
-
- //
- // The methods below are needed to resolve the multiple
- // inheritance of IMessage.
- virtual void acknowledge() {
- ActiveMQMessage::acknowledge() ;
- } ;
- virtual p<PropertyMap> getProperties() {
- return ActiveMQMessage::getProperties() ;
- } ;
- virtual p<string> getJMSCorrelationID() {
- return ActiveMQMessage::getJMSCorrelationID() ;
- } ;
- virtual void setJMSCorrelationID(const char* correlationId) {
- return ActiveMQMessage::setJMSCorrelationID(correlationId) ;
- } ;
- virtual p<IDestination> getJMSDestination() {
- return ActiveMQMessage::getJMSDestination() ;
- } ;
- virtual long long getJMSExpiration() {
- return ActiveMQMessage::getJMSExpiration() ;
- } ;
- virtual void setJMSExpiration(long long time) {
- return ActiveMQMessage::setJMSExpiration(time) ;
- } ;
- virtual p<string> getJMSMessageID() {
- return ActiveMQMessage::getJMSMessageID() ;
- } ;
- virtual bool getJMSPersistent() {
- return ActiveMQMessage::getJMSPersistent() ;
- } ;
- virtual void setJMSPersistent(bool persistent) {
- return ActiveMQMessage::setJMSPersistent(persistent) ;
- } ;
- virtual unsigned char getJMSPriority() {
- return ActiveMQMessage::getJMSPriority() ;
- } ;
- virtual void setJMSPriority(unsigned char priority) {
- return ActiveMQMessage::setJMSPriority(priority) ;
- } ;
- virtual bool getJMSRedelivered() {
- return ActiveMQMessage::getJMSRedelivered() ;
- } ;
- virtual p<IDestination> getJMSReplyTo() {
- return ActiveMQMessage::getJMSReplyTo() ;
- } ;
- virtual void setJMSReplyTo(p<IDestination> destination) {
- return ActiveMQMessage::setJMSReplyTo(destination) ;
- } ;
- virtual long long getJMSTimestamp() {
- return ActiveMQMessage::getJMSTimestamp() ;
- } ;
- virtual p<string> getJMSType() {
- return ActiveMQMessage::getJMSType() ;
- } ;
- virtual void setJMSType(const char* type) {
- return ActiveMQMessage::setJMSType(type) ;
- } ;
- virtual int getJMSXDeliveryCount() {
- return ActiveMQMessage::getJMSXDeliveryCount() ;
- } ;
- virtual p<string> getJMSXGroupID() {
- return ActiveMQMessage::getJMSXGroupID() ;
- } ;
- virtual void setJMSXGroupID(const char* groupId) {
- return ActiveMQMessage::setJMSXGroupID(groupId) ;
- } ;
- virtual int getJMSXGroupSeq() {
- return ActiveMQMessage::getJMSXGroupSeq() ;
- } ;
- virtual void setJMSXGroupSeq(int sequence) {
- return ActiveMQMessage::setJMSXGroupSeq(sequence) ;
- } ;
- virtual p<string> getJMSXProducerTxID() {
- return ActiveMQMessage::getJMSXProducerTxID() ;
- } ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQMapMessage_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_ActiveMQMapMessage_hpp_
+#define ActiveMQ_ActiveMQMapMessage_hpp_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <map>
+#include <string>
+#include "cms/IMapMessage.hpp"
+#include "cms/MessageFormatException.hpp"
+#include "activemq/command/ActiveMQMessage.hpp"
+#include "ppr/IllegalArgumentException.hpp"
+#include "ppr/io/IOutputStream.hpp"
+#include "ppr/io/IInputStream.hpp"
+#include "ppr/util/MapItemHolder.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::cms;
+ using namespace apache::ppr;
+ using namespace apache::ppr::io;
+ using namespace apache::ppr::util;
+
+/*
+ *
+ */
+class ActiveMQMapMessage : public ActiveMQMessage, public IMapMessage
+{
+private:
+ p<string> text ;
+ p<PropertyMap> contentMap ;
+
+public:
+ const static unsigned char TYPE = 25 ;
+
+public:
+ ActiveMQMapMessage() ;
+ virtual ~ActiveMQMapMessage() ;
+
+ virtual unsigned char getDataStructureType() ;
+
+ virtual p<PropertyMap> getBody() ;
+ virtual bool getBoolean(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setBoolean(const char* name, bool value) throw (IllegalArgumentException) ;
+ virtual char getByte(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setByte(const char* name, char value) throw (IllegalArgumentException) ;
+ virtual array<char> getBytes(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setBytes(const char* name, array<char> value) throw (IllegalArgumentException) ;
+ virtual double getDouble(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setDouble(const char* name, double value) throw (IllegalArgumentException) ;
+ virtual float getFloat(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setFloat(const char* name, float value) throw (IllegalArgumentException) ;
+ virtual int getInt(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setInt(const char* name, int value) throw (IllegalArgumentException) ;
+ virtual long long getLong(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setLong(const char* name, long long value) throw (IllegalArgumentException) ;
+ virtual short getShort(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setShort(const char* name, short value) throw (IllegalArgumentException) ;
+ virtual p<string> getString(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
+ virtual void setString(const char* name, const char* value) throw (IllegalArgumentException) ;
+ virtual array<string> getMapNames() ;
+ virtual bool itemExists(const char* name) ;
+
+ 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) ;
+
+ //
+ // The methods below are needed to resolve the multiple
+ // inheritance of IMessage.
+ virtual void acknowledge() {
+ ActiveMQMessage::acknowledge() ;
+ } ;
+ virtual p<PropertyMap> getProperties() {
+ return ActiveMQMessage::getProperties() ;
+ } ;
+ virtual p<string> getJMSCorrelationID() {
+ return ActiveMQMessage::getJMSCorrelationID() ;
+ } ;
+ virtual void setJMSCorrelationID(const char* correlationId) {
+ return ActiveMQMessage::setJMSCorrelationID(correlationId) ;
+ } ;
+ virtual p<IDestination> getJMSDestination() {
+ return ActiveMQMessage::getJMSDestination() ;
+ } ;
+ virtual long long getJMSExpiration() {
+ return ActiveMQMessage::getJMSExpiration() ;
+ } ;
+ virtual void setJMSExpiration(long long time) {
+ return ActiveMQMessage::setJMSExpiration(time) ;
+ } ;
+ virtual p<string> getJMSMessageID() {
+ return ActiveMQMessage::getJMSMessageID() ;
+ } ;
+ virtual bool getJMSPersistent() {
+ return ActiveMQMessage::getJMSPersistent() ;
+ } ;
+ virtual void setJMSPersistent(bool persistent) {
+ return ActiveMQMessage::setJMSPersistent(persistent) ;
+ } ;
+ virtual unsigned char getJMSPriority() {
+ return ActiveMQMessage::getJMSPriority() ;
+ } ;
+ virtual void setJMSPriority(unsigned char priority) {
+ return ActiveMQMessage::setJMSPriority(priority) ;
+ } ;
+ virtual bool getJMSRedelivered() {
+ return ActiveMQMessage::getJMSRedelivered() ;
+ } ;
+ virtual p<IDestination> getJMSReplyTo() {
+ return ActiveMQMessage::getJMSReplyTo() ;
+ } ;
+ virtual void setJMSReplyTo(p<IDestination> destination) {
+ return ActiveMQMessage::setJMSReplyTo(destination) ;
+ } ;
+ virtual long long getJMSTimestamp() {
+ return ActiveMQMessage::getJMSTimestamp() ;
+ } ;
+ virtual p<string> getJMSType() {
+ return ActiveMQMessage::getJMSType() ;
+ } ;
+ virtual void setJMSType(const char* type) {
+ return ActiveMQMessage::setJMSType(type) ;
+ } ;
+ virtual int getJMSXDeliveryCount() {
+ return ActiveMQMessage::getJMSXDeliveryCount() ;
+ } ;
+ virtual p<string> getJMSXGroupID() {
+ return ActiveMQMessage::getJMSXGroupID() ;
+ } ;
+ virtual void setJMSXGroupID(const char* groupId) {
+ return ActiveMQMessage::setJMSXGroupID(groupId) ;
+ } ;
+ virtual int getJMSXGroupSeq() {
+ return ActiveMQMessage::getJMSXGroupSeq() ;
+ } ;
+ virtual void setJMSXGroupSeq(int sequence) {
+ return ActiveMQMessage::setJMSXGroupSeq(sequence) ;
+ } ;
+ virtual p<string> getJMSXProducerTxID() {
+ return ActiveMQMessage::getJMSXProducerTxID() ;
+ } ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQMapMessage_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMapMessage.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp Wed Jul 5 15:36:36 2006
@@ -1,100 +1,100 @@
-/*
- * 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_ActiveMQMessage_hpp_
-#define ActiveMQ_ActiveMQMessage_hpp_
-
-#include <string>
-#include "cms/IDestination.hpp"
-#include "cms/IMessage.hpp"
-#include "activemq/IAcknowledger.hpp"
-#include "activemq/command/Message.hpp"
-#include "activemq/command/LocalTransactionId.hpp"
-#include "activemq/command/XATransactionId.hpp"
-#include "ppr/io/IOException.hpp"
-#include "ppr/util/Hex.hpp"
-#include "ppr/util/MapItemHolder.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace apache::activemq;
- using namespace apache::cms;
- using namespace apache::ppr::io;
- using namespace apache::ppr::util;
-
-/*
- *
- */
-class ActiveMQMessage : public Message, public IMessage
-{
-private:
- p<IAcknowledger> acknowledger ;
- p<PropertyMap> properties ;
-
-public:
- const static unsigned char TYPE = 23 ;
-
-public:
- // Attributes
- virtual unsigned char getDataStructureType() ;
- virtual p<IDestination> getFromDestination() ;
- virtual void setFromDestination(p<IDestination> destination) ;
- virtual void setAcknowledger(p<IAcknowledger> acknowledger) ;
- virtual p<PropertyMap> getProperties() ;
- virtual p<string> getJMSCorrelationID() ;
- virtual void setJMSCorrelationID(const char* correlationId) ;
- virtual p<IDestination> getJMSDestination() ;
- virtual long long getJMSExpiration() ;
- virtual void setJMSExpiration(long long time) ;
- virtual p<string> getJMSMessageID() ;
- virtual bool getJMSPersistent() ;
- virtual void setJMSPersistent(bool persistent) ;
- virtual unsigned char getJMSPriority() ;
- virtual void setJMSPriority(unsigned char priority) ;
- virtual bool getJMSRedelivered() ;
- virtual p<IDestination> getJMSReplyTo() ;
- virtual void setJMSReplyTo(p<IDestination> destination) ;
- virtual long long getJMSTimestamp() ;
- virtual p<string> getJMSType() ;
- virtual void setJMSType(const char* type) ;
- virtual int getJMSXDeliveryCount() ;
- virtual p<string> getJMSXGroupID() ;
- virtual void setJMSXGroupID(const char* groupId) ;
- virtual int getJMSXGroupSeq() ;
- virtual void setJMSXGroupSeq(int sequence) ;
- virtual p<string> getJMSXProducerTxID() ;
-
- // Operations
- virtual void acknowledge() ;
-
-protected:
- // Implementation
- int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
- void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQMessage_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_ActiveMQMessage_hpp_
+#define ActiveMQ_ActiveMQMessage_hpp_
+
+#include <string>
+#include "cms/IDestination.hpp"
+#include "cms/IMessage.hpp"
+#include "activemq/IAcknowledger.hpp"
+#include "activemq/command/Message.hpp"
+#include "activemq/command/LocalTransactionId.hpp"
+#include "activemq/command/XATransactionId.hpp"
+#include "ppr/io/IOException.hpp"
+#include "ppr/util/Hex.hpp"
+#include "ppr/util/MapItemHolder.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace apache::activemq;
+ using namespace apache::cms;
+ using namespace apache::ppr::io;
+ using namespace apache::ppr::util;
+
+/*
+ *
+ */
+class ActiveMQMessage : public Message, public IMessage
+{
+private:
+ p<IAcknowledger> acknowledger ;
+ p<PropertyMap> properties ;
+
+public:
+ const static unsigned char TYPE = 23 ;
+
+public:
+ // Attributes
+ virtual unsigned char getDataStructureType() ;
+ virtual p<IDestination> getFromDestination() ;
+ virtual void setFromDestination(p<IDestination> destination) ;
+ virtual void setAcknowledger(p<IAcknowledger> acknowledger) ;
+ virtual p<PropertyMap> getProperties() ;
+ virtual p<string> getJMSCorrelationID() ;
+ virtual void setJMSCorrelationID(const char* correlationId) ;
+ virtual p<IDestination> getJMSDestination() ;
+ virtual long long getJMSExpiration() ;
+ virtual void setJMSExpiration(long long time) ;
+ virtual p<string> getJMSMessageID() ;
+ virtual bool getJMSPersistent() ;
+ virtual void setJMSPersistent(bool persistent) ;
+ virtual unsigned char getJMSPriority() ;
+ virtual void setJMSPriority(unsigned char priority) ;
+ virtual bool getJMSRedelivered() ;
+ virtual p<IDestination> getJMSReplyTo() ;
+ virtual void setJMSReplyTo(p<IDestination> destination) ;
+ virtual long long getJMSTimestamp() ;
+ virtual p<string> getJMSType() ;
+ virtual void setJMSType(const char* type) ;
+ virtual int getJMSXDeliveryCount() ;
+ virtual p<string> getJMSXGroupID() ;
+ virtual void setJMSXGroupID(const char* groupId) ;
+ virtual int getJMSXGroupSeq() ;
+ virtual void setJMSXGroupSeq(int sequence) ;
+ virtual p<string> getJMSXProducerTxID() ;
+
+ // Operations
+ virtual void acknowledge() ;
+
+protected:
+ // Implementation
+ int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
+ void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQMessage_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQMessage.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQObjectMessage.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQObjectMessage.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQObjectMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQObjectMessage.hpp Wed Jul 5 15:36:36 2006
@@ -1,53 +1,53 @@
-/*
- * 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_ActiveMQObjectMessage_hpp_
-#define ActiveMQ_ActiveMQObjectMessage_hpp_
-
-#include <string>
-#include "activemq/command/ActiveMQMessage.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
-
-/*
- *
- */
-class ActiveMQObjectMessage : public ActiveMQMessage
-{
-public:
- const static unsigned char TYPE = 26 ;
-
-public:
- ActiveMQObjectMessage() ;
- virtual ~ActiveMQObjectMessage() ;
-
- virtual unsigned char getDataStructureType() ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQObjectMessage_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_ActiveMQObjectMessage_hpp_
+#define ActiveMQ_ActiveMQObjectMessage_hpp_
+
+#include <string>
+#include "activemq/command/ActiveMQMessage.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+
+/*
+ *
+ */
+class ActiveMQObjectMessage : public ActiveMQMessage
+{
+public:
+ const static unsigned char TYPE = 26 ;
+
+public:
+ ActiveMQObjectMessage() ;
+ virtual ~ActiveMQObjectMessage() ;
+
+ virtual unsigned char getDataStructureType() ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQObjectMessage_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQObjectMessage.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQQueue.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQQueue.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQQueue.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQQueue.hpp Wed Jul 5 15:36:36 2006
@@ -1,55 +1,55 @@
-/*
- * 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_ActiveMQQueue_hpp_
-#define ActiveMQ_ActiveMQQueue_hpp_
-
-#include "cms/IQueue.hpp"
-#include "activemq/command/ActiveMQDestination.hpp"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace apache::cms;
-
-/*
- *
- */
-class ActiveMQQueue : public ActiveMQDestination, public IQueue
-{
-public:
- const static unsigned char TYPE = 100 ;
-
-public:
- ActiveMQQueue() ;
- ActiveMQQueue(const char* name) ;
- virtual ~ActiveMQQueue() ;
-
- virtual unsigned char getDataStructureType() ;
- virtual p<string> getQueueName() ;
- virtual int getDestinationType() ;
- virtual p<ActiveMQDestination> createDestination(const char* name) ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQQueue_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_ActiveMQQueue_hpp_
+#define ActiveMQ_ActiveMQQueue_hpp_
+
+#include "cms/IQueue.hpp"
+#include "activemq/command/ActiveMQDestination.hpp"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace apache::cms;
+
+/*
+ *
+ */
+class ActiveMQQueue : public ActiveMQDestination, public IQueue
+{
+public:
+ const static unsigned char TYPE = 100 ;
+
+public:
+ ActiveMQQueue() ;
+ ActiveMQQueue(const char* name) ;
+ virtual ~ActiveMQQueue() ;
+
+ virtual unsigned char getDataStructureType() ;
+ virtual p<string> getQueueName() ;
+ virtual int getDestinationType() ;
+ virtual p<ActiveMQDestination> createDestination(const char* name) ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQQueue_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQQueue.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQStreamMessage.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQStreamMessage.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQStreamMessage.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQStreamMessage.hpp Wed Jul 5 15:36:36 2006
@@ -1,53 +1,53 @@
-/*
- * 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_ActiveMQStreamMessage_hpp_
-#define ActiveMQ_ActiveMQStreamMessage_hpp_
-
-#include <string>
-#include "activemq/command/ActiveMQMessage.hpp"
-#include "ppr/util/ifr/p"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
- using namespace ifr;
- using namespace std;
-
-/*
- *
- */
-class ActiveMQStreamMessage : public ActiveMQMessage
-{
-public:
- const static unsigned char TYPE = 27 ;
-
-public:
- ActiveMQStreamMessage() ;
- virtual ~ActiveMQStreamMessage() ;
-
- virtual unsigned char getDataStructureType() ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQStreamMessage_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_ActiveMQStreamMessage_hpp_
+#define ActiveMQ_ActiveMQStreamMessage_hpp_
+
+#include <string>
+#include "activemq/command/ActiveMQMessage.hpp"
+#include "ppr/util/ifr/p"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+ using namespace ifr;
+ using namespace std;
+
+/*
+ *
+ */
+class ActiveMQStreamMessage : public ActiveMQMessage
+{
+public:
+ const static unsigned char TYPE = 27 ;
+
+public:
+ ActiveMQStreamMessage() ;
+ virtual ~ActiveMQStreamMessage() ;
+
+ virtual unsigned char getDataStructureType() ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQStreamMessage_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQStreamMessage.hpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTempDestination.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTempDestination.hpp?rev=419371&r1=419370&r2=419371&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTempDestination.hpp (original)
+++ incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTempDestination.hpp Wed Jul 5 15:36:36 2006
@@ -1,50 +1,50 @@
-/*
- * 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_ActiveMQTempDestination_hpp_
-#define ActiveMQ_ActiveMQTempDestination_hpp_
-
-#include "activemq/command/ActiveMQDestination.hpp"
-
-namespace apache
-{
- namespace activemq
- {
- namespace command
- {
-
-/*
- *
- */
-class ActiveMQTempDestination : public ActiveMQDestination
-{
-public:
- const static unsigned char TYPE = 0 ;
-
-public:
- ActiveMQTempDestination() ;
- ActiveMQTempDestination(const char* name) ;
- virtual ~ActiveMQTempDestination() ;
-
- virtual unsigned char getDataStructureType() ;
-} ;
-
-/* namespace */
- }
- }
-}
-
-#endif /*ActiveMQ_ActiveMQTempDestination_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_ActiveMQTempDestination_hpp_
+#define ActiveMQ_ActiveMQTempDestination_hpp_
+
+#include "activemq/command/ActiveMQDestination.hpp"
+
+namespace apache
+{
+ namespace activemq
+ {
+ namespace command
+ {
+
+/*
+ *
+ */
+class ActiveMQTempDestination : public ActiveMQDestination
+{
+public:
+ const static unsigned char TYPE = 0 ;
+
+public:
+ ActiveMQTempDestination() ;
+ ActiveMQTempDestination(const char* name) ;
+ virtual ~ActiveMQTempDestination() ;
+
+ virtual unsigned char getDataStructureType() ;
+} ;
+
+/* namespace */
+ }
+ }
+}
+
+#endif /*ActiveMQ_ActiveMQTempDestination_hpp_*/
Propchange: incubator/activemq/trunk/openwire-cpp/src/main/cpp/activemq/command/ActiveMQTempDestination.hpp
------------------------------------------------------------------------------
svn:eol-style = native