Author: tabish
Date: Fri Aug 13 17:47:19 2010
New Revision: 985300
URL: http://svn.apache.org/viewvc?rev=985300&view=rev
Log:
Add defaults to the Message interface in CMS for Priority, Message Persistence
and Time to Live.
Added:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp (with
props)
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp?rev=985300&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp Fri Aug
13 17:47:19 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 <cms/Message.h>
+
+#include <cms/DeliveryMode.h>
+
+using namespace cms;
+
+////////////////////////////////////////////////////////////////////////////////
+const int Message::DEFAULT_DELIVERY_MODE = cms::DeliveryMode::PERSISTENT;
+const int Message::DEFAULT_MSG_PRIORITY = 4;
+const int Message::DEFAULT_TIME_TO_LIVE = 0;
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h?rev=985300&r1=985299&r2=985300&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/cms/Message.h Fri Aug 13
17:47:19 2010
@@ -88,6 +88,23 @@ namespace cms{
class CMS_API Message {
public:
+ /**
+ * The Default delivery mode for Message Producers is PERSISTENT.
+ */
+ static const int DEFAULT_DELIVERY_MODE;
+
+ /**
+ * The Default priority assigned to a Message is 4.
+ */
+ static const int DEFAULT_MSG_PRIORITY;
+
+ /**
+ * The Default Time to Live for a Message Producer is unlimited, the
message will never expire.
+ */
+ static const long long DEFAULT_TIME_TO_LIVE;
+
+ public:
+
virtual ~Message() throw() {}
/**