You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/07/31 11:36:51 UTC
svn commit: r427057 [5/22] - in /incubator/activemq/trunk/amazon: ./
amq_brokersession/ amq_corelib/ amq_examples/ amq_examples/bs_async_recv/
amq_examples/bs_send/ amq_examples/bs_sync_recv/ amq_examples/cl_send/
amq_transport/ command/ marshal/
Added: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,73 @@
+/*
+ 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 <stdlib.h>
+
+#include "MessageConsumerRef.h"
+#include "CoreLib.h"
+#include "RCSID.h"
+#include "Message.h"
+
+using namespace ActiveMQ;
+
+RCSID(MessageConsumerRef, "$Id$");
+
+MessageConsumerRef::MessageConsumerRef()
+ : owner_(NULL)
+ {}
+
+MessageConsumerRef::MessageConsumerRef(const MessageConsumerRef& oth)
+ : owner_(oth.owner_)
+ {}
+
+MessageConsumerRef&
+MessageConsumerRef::operator=(const MessageConsumerRef& oth) {
+ if (this == &oth)
+ return *this;
+ bool firstInit = (owner_ == NULL);
+ if (!firstInit)
+ owner_->deregisterRef(this);
+ owner_ = oth.owner_;
+ if (firstInit && owner_)
+ owner_->registerRef(this);
+ return *this;
+}
+
+MessageConsumerRef::MessageConsumerRef(CoreLib *owner) : owner_(owner) {
+ // leave it up to child classes to register
+
+ // Calling corelib->registerRef calls back to the pure virtual
+ // method getConsumer(), which when called from this constructor
+ // will call the actual pure virtual method (which calls
+ // std::terminate).
+}
+
+MessageConsumerRef::~MessageConsumerRef() {
+
+}
+
+void
+MessageConsumerRef::invalidate() {
+ owner_ = NULL;
+}
+
+Message *
+MessageConsumerRef::receivePtr() {
+ return receive().release();
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,96 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_MSGCONSUMER_REF_H
+#define ACTIVEMQ_MSGCONSUMER_REF_H
+
+#include <memory>
+
+namespace ActiveMQ {
+ class Message;
+ class CoreLib;
+ class MessageConsumer;
+
+ /// Base class for MessageConsumerRefs
+ /**
+ This class provides the common interface for
+ MessageConsumerRefs, which are handles on objects allow the
+ application to receive Messages. They are weak references, so
+ they can be invalid, but you are free to copy them around. See
+ the documentation for ActiveMQ::NonBlockingMessageConsumerRef
+ and ActiveMQ::BlockingMessageConsumerRef.
+
+ @version $Id$
+ */
+ class MessageConsumerRef {
+ public:
+ /// gets the number of messages that are ready
+ /**
+ Gets the number of waiting messages.
+
+ @returns the number
+ */
+ virtual int getNumReadyMessages() const = 0;
+
+ /// receives a message
+ /**
+ Pulls a message from the internal queue. It is returned as
+ a std::auto_ptr to make the ownership policy clear.
+
+ @returns the new message
+ */
+ virtual std::auto_ptr<Message> receive() = 0;
+
+ /// receives a dumb pointer to a message
+ /**
+ Just like receive(), but not in auto_ptr form. <b>Note:
+ the caller still owns this memory, but it's just not
+ enforced by the compiler.</b> The caller is responsible for
+ freeing this memory (using delete);
+
+ @returns a dumb pointer to the message
+ */
+ Message *receivePtr();
+
+ /// checks validity
+ /**
+ Since this class is a weak reference, it could be
+ invalidated. If it's invalid, calling any function other
+ than isValid() will throw.
+
+ @returns true if the reference is invalid
+ */
+ virtual bool isValid() const = 0;
+
+ protected:
+ MessageConsumerRef();
+ MessageConsumerRef(const MessageConsumerRef &);
+ MessageConsumerRef& operator=(const MessageConsumerRef &);
+ virtual ~MessageConsumerRef();
+
+ friend class CoreLibImpl;
+ MessageConsumerRef(CoreLib *parent);
+ CoreLib *owner_;
+ virtual MessageConsumer *getConsumer() const = 0;
+ private:
+ void invalidate();
+ };
+};
+
+#endif // ACTIVEMQ_MSGCONSUMER_REF_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/MessageConsumerRef.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,73 @@
+/*
+ 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 "NonBlockingMessageConsumer.h"
+#include "RCSID.h"
+#include "Message.h"
+
+#include <algorithm>
+
+#include <unistd.h>
+
+using namespace ActiveMQ;
+using std::auto_ptr;
+
+RCSID(NonBlockingMessageConsumer, "$Id$")
+
+NonBlockingMessageConsumer::NonBlockingMessageConsumer() {
+ pipe(eventpipe_);
+}
+
+NonBlockingMessageConsumer::~NonBlockingMessageConsumer() {
+ close(eventpipe_[0]);
+ close(eventpipe_[1]);
+}
+
+void
+NonBlockingMessageConsumer::enqueue(Message *msg) {
+ messages_.push_back(msg);
+ if (messages_.size() == 1)
+ write(eventpipe_[1], "0", 1);
+}
+
+auto_ptr<Message>
+NonBlockingMessageConsumer::receive() {
+ if (messages_.empty())
+ return auto_ptr<Message>(NULL);
+ Message *ret = messages_.front();
+ messages_.pop_front();
+ if (messages_.empty()) {
+ unsigned char buf;
+ read(eventpipe_[0], &buf, 1);
+ }
+ return auto_ptr<Message>(ret);
+}
+
+unsigned int
+NonBlockingMessageConsumer::getNumReadyMessages() const {
+ return messages_.size();
+}
+
+void
+NonBlockingMessageConsumer::removeQueued(const Destination &d) {
+ messages_.erase(std::remove_if(messages_.begin(),
+ messages_.end(),
+ HasDest(d)),
+ messages_.end());
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,77 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_NONBLOCKINGMSGCONSUMER_H
+#define ACTIVEMQ_NONBLOCKINGMSGCONSUMER_H
+
+#include <deque>
+#include <memory>
+
+#include "MessageConsumer.h"
+
+namespace ActiveMQ {
+ class CoreLib;
+
+ /// Message vendor with nonblocking semantics. (private)
+ /**
+ This class holds messages that have been received by a
+ BrokerSession object but not delivered to the application. It
+ contains an internal queue and an event file descriptor.
+
+ When a Message is enqueued, it is stored internally and the
+ event file descriptor is made read active. The receive() call
+ will return NULL if no message is ready. If a message is
+ ready, it will return the message (the fd will remain read
+ active as long as there are messages ready).
+
+ <b>The user of the API never actually owns one of these.</b>
+ The library vends instances of NonBlockingMessageConsumerRef.
+ The NonBlockingMessageConsumer object is destroyed when all of
+ its references have been destroyed.
+
+ See NonBlockingMessageConsumerRef for usage details.
+
+ <b>Unlike the BlockingMessageConsumer, this class does not do
+ thread synchronization for you.</b> This is to allow use of a
+ MessageConsumer without requiring that pthreads be compiled in.
+
+ @version $Id$
+ */
+ class NonBlockingMessageConsumer : public MessageConsumer {
+ private:
+ int eventpipe_[2];
+ std::deque<Message *> messages_;
+
+ NonBlockingMessageConsumer(const NonBlockingMessageConsumer& oth);
+ const NonBlockingMessageConsumer& operator=(const NonBlockingMessageConsumer& oth);
+
+ friend class CoreLibImpl;
+ NonBlockingMessageConsumer();
+ virtual ~NonBlockingMessageConsumer();
+ void enqueue(Message *msg);
+ void removeQueued(const Destination &d);
+
+ friend class NonBlockingMessageConsumerRef;
+ int getEventFD() const { return eventpipe_[0]; }
+ unsigned int getNumReadyMessages() const;
+ std::auto_ptr<Message> receive();
+ };
+};
+
+#endif // ACTIVEMQ_NONBLOCKINGMSGCONSUMER_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumer.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,95 @@
+/*
+ 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 "NonBlockingMessageConsumerRef.h"
+#include "NonBlockingMessageConsumer.h"
+#include "CoreLib.h"
+#include "Exception.h"
+#include "RCSID.h"
+
+using namespace ActiveMQ;
+using std::auto_ptr;
+
+RCSID(NonBlockingMessageConsumerRef, "$Id$");
+
+NonBlockingMessageConsumerRef::NonBlockingMessageConsumerRef()
+ : MessageConsumerRef(),
+ cons_(NULL)
+ {}
+
+NonBlockingMessageConsumerRef::NonBlockingMessageConsumerRef
+ (CoreLib *a, NonBlockingMessageConsumer *q) :
+ MessageConsumerRef(a), cons_(q) {
+ if (isValid())
+ owner_->registerRef(this);
+}
+
+NonBlockingMessageConsumerRef::NonBlockingMessageConsumerRef
+(const NonBlockingMessageConsumerRef& oth)
+ : MessageConsumerRef(oth), cons_(oth.cons_)
+{
+ if (isValid())
+ owner_->registerRef(this);
+}
+
+NonBlockingMessageConsumerRef &
+NonBlockingMessageConsumerRef::operator=
+ (const NonBlockingMessageConsumerRef& oth) {
+ if (this == &oth)
+ return *this;
+ cons_ = oth.cons_;
+ MessageConsumerRef::operator=(oth);
+ return *this;
+}
+
+NonBlockingMessageConsumerRef::~NonBlockingMessageConsumerRef() {
+ if (isValid())
+ owner_->deregisterRef(this);
+}
+
+int
+NonBlockingMessageConsumerRef::getNumReadyMessages() const {
+ if (!isValid())
+ throw Exception("getNumReadyMessages called on invalid reference!");
+ return cons_->getNumReadyMessages();
+}
+
+auto_ptr<Message>
+NonBlockingMessageConsumerRef::receive() {
+ if (!isValid())
+ throw Exception("receive called on invalid reference!");
+ return cons_->receive();
+}
+
+int
+NonBlockingMessageConsumerRef::getEventFD() const {
+ if (!isValid())
+ throw Exception("getEventFD called on invalid reference!");
+ return cons_->getEventFD();
+}
+
+bool
+NonBlockingMessageConsumerRef::isValid() const {
+ return owner_ != NULL && cons_ != NULL;
+}
+
+MessageConsumer *
+NonBlockingMessageConsumerRef::getConsumer() const {
+ return cons_;
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,111 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_NONBLOCKINGMSGCONSUMER_REF_H
+#define ACTIVEMQ_NONBLOCKINGMSGCONSUMER_REF_H
+
+#include "MessageConsumerRef.h"
+
+namespace ActiveMQ {
+ class CoreLib;
+ class NonBlockingMessageConsumer;
+
+ /// handle on message vendor with nonblocking semantics.
+ /**
+ This class is a handle on a NonBlockingMessageConsumer, which
+ is an object that holds messages that have been received by a
+ BrokerSession object but not delivered to the application. It
+ contains an internal queue and an event file descriptor.
+
+ When a Message is enqueued, it is stored internally and the
+ event file descriptor will become read active. When there are
+ no messages ready, it will be read unactive. <b>Do not read
+ data from this file descriptor</b> - no more than one byte is
+ ever actually on it.
+
+ The receive() call will return NULL if no message is ready. If
+ a message is ready, it will return the message.
+
+ NonBlockingMessageConsumers are owned by the library, so this
+ weak reference class is provided to allow flexible sharing of
+ the handle (like a pointer) while at the same time providing
+ protection from pointer invalidation. When the owning library
+ is destructed, it will nullify existing weak reference objects
+ so that calls will throw instead of crashing.
+
+ @version $Id$
+ */
+ class NonBlockingMessageConsumerRef : public MessageConsumerRef {
+ public:
+ NonBlockingMessageConsumerRef();
+ NonBlockingMessageConsumerRef(const NonBlockingMessageConsumerRef &);
+ NonBlockingMessageConsumerRef& operator=(const NonBlockingMessageConsumerRef &);
+ virtual ~NonBlockingMessageConsumerRef();
+
+ /// gets the event file descriptor
+ /**
+ Gets the file descriptor that will have data on it when a
+ message is ready.
+
+ @returns the event file descriptor
+ */
+ int getEventFD() const;
+
+ /// gets the number of messages that are ready
+ /**
+ Gets the number of waiting messages.
+
+ @returns the number
+ */
+ int getNumReadyMessages() const;
+
+ /// nonblocking receive
+ /**
+ Receives a Message. If none are ready, this will return
+ NULL (specifically, an auto_ptr pointing to NULL).
+
+ If the queue is emptied as a result of this call, the event
+ file descriptor will become non-readable.
+
+ Note that a variant of receive() that returns a regular
+ pointer is defined on ActiveMQ::MessageConsumerRef.
+
+ @returns the new Message
+ */
+ std::auto_ptr<Message> receive();
+
+ /// checks validity
+ /**
+ Since this class is a weak reference, it could be
+ invalidated. If it's invalid, calling these functions will
+ throw.
+
+ @returns true if the reference is invalid
+ */
+ virtual bool isValid() const;
+
+ private:
+ friend class CoreLibImpl;
+ NonBlockingMessageConsumerRef(CoreLib *a, NonBlockingMessageConsumer *q);
+ NonBlockingMessageConsumer *cons_;
+ MessageConsumer *getConsumer() const;
+ };
+};
+
+#endif // ACTIVEMQ_NONBLOCKINGMSGCONSUMER_REF_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NonBlockingMessageConsumerRef.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,43 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_NULLLOGGER_H
+#define ACTIVEMQ_NULLLOGGER_H
+
+#include "Logger.h"
+
+namespace ActiveMQ {
+ /// default, "null" logger
+ /**
+ An instance of this class is used as the logger before one is
+ set explicitly. It reports all logging levels as disabled and
+ all log operations are no-ops.
+ */
+ class NullLogger : public Logger {
+ public:
+ bool isEnabled(const LogLevel& l) { return false; }
+ void logFatal(const std::string& msg) {}
+ void logError(const std::string& msg) {}
+ void logWarning(const std::string& msg) {}
+ void logInform(const std::string& msg) {}
+ void logDebug(const std::string& msg) {}
+ };
+};
+
+#endif // ACTIVEMQ_NULLLOGGER_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/NullLogger.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,131 @@
+/*
+ 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 <utility>
+
+#include "PrimitiveMap.h"
+#include "netinet/in.h"
+
+using namespace std;
+using ActiveMQ::PrimitiveMap;
+using ActiveMQ::Buffer;
+
+static const unsigned char NULL_TYPE = 0;
+static const unsigned char BOOLEAN_TYPE = 1;
+static const unsigned char BYTE_TYPE = 2;
+static const unsigned char CHAR_TYPE = 3;
+static const unsigned char SHORT_TYPE = 4;
+static const unsigned char INTEGER_TYPE = 5;
+static const unsigned char LONG_TYPE = 6;
+static const unsigned char DOUBLE_TYPE = 7;
+static const unsigned char FLOAT_TYPE = 8;
+static const unsigned char STRING_TYPE = 9;
+static const unsigned char BYTE_ARRAY_TYPE = 10;
+
+PrimitiveMap::PrimitiveMap()
+ {}
+
+PrimitiveMap::PrimitiveMap(const Buffer& b) {
+ // unmarshal from given buffer
+
+ const unsigned char *buf = &(b[0]);
+
+ int32_t count = ntohl(*((const int32_t*)buf));
+
+ buf += 4;
+
+ for (int i = 0; i < count; i++) {
+ // get the size of the key string
+ int16_t keysize = ntohs(*((const int16_t*)buf));
+ buf += 2;
+ // get the key string
+ std::string key((const char *)(buf), keysize);
+ buf += keysize;
+ // get the type
+ unsigned char type = *buf;
+ ++buf;
+
+ bool val;
+ int bytearraylen;
+ short strsize;
+
+ switch (type) {
+ case BOOLEAN_TYPE:
+ val = (bool)(*buf);
+ ++buf;
+ booleanMap_.insert(pair<string, bool>(key, val));
+ break;
+ // ignore the other types for now
+ case BYTE_TYPE:
+ ++buf;
+ break;
+ case CHAR_TYPE:
+ ++buf;
+ break;
+ case SHORT_TYPE:
+ buf += 2;
+ break;
+ case INTEGER_TYPE:
+ buf += 4;
+ break;
+ case LONG_TYPE:
+ buf += 8;
+ break;
+ case FLOAT_TYPE:
+ buf += 4;
+ break;
+ case DOUBLE_TYPE:
+ buf += 8;
+ break;
+ case BYTE_ARRAY_TYPE:
+ bytearraylen = ntohl(*(const int32_t*)buf);
+ buf += 4;
+ buf += bytearraylen;
+ break;
+ case STRING_TYPE:
+ strsize = ntohs(*(const int16_t*)buf);
+ buf += strsize;
+ break;
+ }
+ }
+}
+
+void
+PrimitiveMap::marshal(Buffer& b) const {
+ // write the size
+ int32_t size = htonl(booleanMap_.size());
+ b.insert(b.end(), (unsigned char *)&size, ((unsigned char *)(&size)) + 4);
+
+ // write each key/val pair
+ for (map<string, bool>::const_iterator i = booleanMap_.begin();
+ i != booleanMap_.end(); ++i) {
+ // write the key size
+ int16_t keysize = htons(i->first.size());
+ b.insert(b.end(), (unsigned char *)&keysize, ((unsigned char *)(&keysize)) + 2);
+
+ // write the key
+ b.insert(b.end(), (unsigned char *)i->first.c_str(), ((unsigned char *)i->first.c_str()) + ntohs(keysize));
+
+ // write the value type
+ b.push_back(BOOLEAN_TYPE);
+
+ // write the value
+ b.push_back((unsigned char)i->second);
+ }
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,44 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_PRIMITIVEMAP_H
+#define ACTIVEMQ_PRIMITIVEMAP_H
+
+#include <string>
+#include <map>
+
+#include "Buffer.h"
+
+namespace ActiveMQ {
+ class PrimitiveMap {
+ public:
+ PrimitiveMap();
+ PrimitiveMap(const Buffer& b);
+
+ void putBoolean(const std::string& key, bool val) { booleanMap_[key] = val; }
+ bool getBoolean(const std::string& key) const { return booleanMap_.find(key)->second; }
+
+ void marshal(Buffer& b) const;
+
+ private:
+ std::map<std::string, bool> booleanMap_;
+ };
+};
+
+#endif // ACTIVEMQ_PRIMITIVEMAP_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/PrimitiveMap.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/RCSID.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/RCSID.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/RCSID.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/RCSID.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,22 @@
+/*
+ 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.
+*/
+
+#define RCSID(name, id) \
+ static const char* _ ## name ## _rcs = #name " " id; \
+ static const void* const use_rcsid = (void *)(& _ ## name ## _rcs);
Propchange: incubator/activemq/trunk/amazon/amq_corelib/RCSID.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/RCSID.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,69 @@
+/*
+ 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 <sys/types.h>
+#include <unistd.h>
+
+#include <sstream>
+
+#include "Sem.h"
+
+using ActiveMQ::Semaphore;
+using std::string;
+using std::stringstream;
+
+Semaphore::Semaphore(unsigned int defvalue) {
+#ifdef __APPLE__
+ sem_ = sem_open(getName_().c_str(), O_CREAT | O_EXCL, 700, defvalue);
+#else
+ sem_ = new sem_t();
+ sem_init(sem_, 0, defvalue);
+#endif
+}
+
+void
+Semaphore::post() {
+ sem_post(sem_);
+}
+
+void
+Semaphore::wait() {
+ sem_wait(sem_);
+}
+
+/* static */
+string
+Semaphore::getName_() {
+ stringstream ss;
+ ss << getpid() << ":" << ++counter_;
+ return ss.str();
+}
+
+/* static */
+int
+Semaphore::counter_ = 0;
+
+Semaphore::~Semaphore() {
+#ifdef __APPLE__
+ sem_close(sem_);
+#else
+ sem_destroy(sem_);
+ delete sem_;
+#endif
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/Sem.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/Sem.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/Sem.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/Sem.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/Sem.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,55 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_SEMAPHORE_H
+#define ACTIVEMQ_SEMAPHORE_H
+
+#include <semaphore.h>
+#include <string>
+
+namespace ActiveMQ {
+
+ /// Abstraction class for Semaphores
+ /**
+ This class holds a logical semaphore. Since semaphores don't
+ have exactly the same API across platforms, this class is
+ provided to keep preprocessor statements out of the rest of the
+ code.
+ */
+ class Semaphore {
+ public:
+ /// Constructs a new semaphore
+ explicit Semaphore(unsigned int defvalue = 0);
+
+ /// Posts on the semaphore, waking a blocked thread
+ void post();
+
+ /// Waits for another thread to post
+ void wait();
+
+ ~Semaphore();
+ private:
+ sem_t *sem_;
+
+ static std::string getName_();
+ static int counter_;
+ };
+};
+
+#endif // ACTIVEMQ_SEMAPHORE_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/Sem.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/Sem.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,58 @@
+/*
+ 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 "StompMessage.h"
+#include "Exception.h"
+#include "RCSID.h"
+
+using namespace std;
+using ActiveMQ::Exception;
+using ActiveMQ::StompMessage;
+
+RCSID(StompMessage, "$Id$");
+
+StompMessage::StompMessage(const string& buf)
+{
+ string::size_type newline = buf.find("\n", 0);
+ if (newline == string::npos)
+ throw Exception(string("Invalid message: ") + buf);
+ if (newline == 0) {
+ newline = buf.find("\n", 1);
+ if (newline == string::npos)
+ throw Exception(string("Invalid message: ") + buf);
+ type_ = string(buf, 1, newline - 1);
+ }
+ else
+ type_ = string(buf, 0, newline);
+ if (buf.find("\n", newline + 1) == newline + 1) // no headers
+ msg_ = string(buf, newline + 1, buf.size() - newline);
+ else {
+ do {
+ string::size_type colon_pos = buf.find(":", newline + 1);
+ if (colon_pos == string::npos)
+ throw Exception(string("Invalid message: ") + buf);
+ string key = string(buf, newline + 1, colon_pos - newline - 1);
+ newline = buf.find("\n", colon_pos);
+ if (newline == string::npos)
+ throw Exception(string("Invalid message: ") + buf);
+ headers_[key] = string(buf, colon_pos + 1, newline - colon_pos - 1);
+ } while (buf[newline + 1] != '\n');
+ msg_ = string(buf, newline + 2, buf.size() - newline - 2);
+ }
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,44 @@
+/*
+ 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.
+*/
+
+#ifndef STOMP_MESSAGE_H
+#define STOMP_MESSAGE_H
+
+#include <string>
+#include <map>
+
+namespace ActiveMQ {
+ class StompMessage {
+ public:
+ typedef std::map<std::string, std::string> HeaderMap;
+
+ StompMessage(const std::string& buf);
+ StompMessage() {}
+
+ const std::string &getType() const { return type_; }
+ const std::string &getMsg() const { return msg_; }
+ const std::map<std::string, std::string> &getHeaders() const { return headers_; }
+ private:
+ std::string type_;
+ std::string msg_;
+ HeaderMap headers_;
+ };
+};
+
+#endif // STOMP_MESSAGE_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/StompMessage.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,43 @@
+/*
+ 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 <algorithm>
+#include <netinet/in.h>
+
+#include "TextMessage.h"
+#include "Buffer.h"
+#include "RCSID.h"
+
+using namespace ActiveMQ;
+using std::copy;
+using std::vector;
+
+RCSID(TextMessage, "$Id$");
+
+TextMessage::TextMessage(const vector<unsigned char>& serializeFrom) {
+ text_.assign(serializeFrom.begin() + 4, serializeFrom.end());
+}
+
+void
+TextMessage::marshall(Buffer& buf) const {
+ buf.resize(text_.size() + sizeof(int));
+ int size = htonl(text_.size());
+ copy((unsigned char *)(&size), ((unsigned char *)(&size)) + sizeof(int), buf.begin());
+ copy(text_.begin(), text_.end(), buf.begin()+sizeof(int));
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,75 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_TEXTMESSAGE_H
+#define ACTIVEMQ_TEXTMESSAGE_H
+
+#include <string>
+#include <vector>
+
+#include "Message.h"
+
+namespace ActiveMQ {
+ class CoreLibImpl;
+
+ /// Message containing a text string
+ /**
+ @version $Id$
+ */
+ class TextMessage : public Message {
+ public:
+ /// gets the type
+ /**
+ Gets the integer type of this message.
+
+ @returns the type
+ */
+ int getType() const { return Command::Types::ACTIVEMQ_TEXT_MESSAGE; }
+
+ /// Constructs a new TextMessage.
+ /**
+ Makes a new TextMessage containing the given string.
+ */
+ TextMessage(const std::string& data) : text_(data) {}
+
+ /// gets the string data
+ /**
+ Gets the string this TextMessage represents.
+
+ @returns message contents
+ */
+ const std::string& getText() const { return text_; }
+
+ /// gets the data as a byte array
+ /**
+ Gets the string data as an opaque byte array.
+
+ @param buf the buffer the put the data in
+ */
+ void marshall(Buffer& buf) const;
+
+ private:
+ std::string text_;
+
+ friend class CoreLibImpl;
+ TextMessage(const Buffer& deserializeFrom);
+ };
+};
+
+#endif // ACTIVEMQ_TEXTMESSAGE_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/TextMessage.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,64 @@
+/*
+ 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 <unistd.h>
+#include <time.h>
+#include <sys/time.h>
+#include <stdlib.h>
+#include <sstream>
+
+#include "UUIDGenerator.h"
+
+using ActiveMQ::UUIDGenerator;
+using namespace std;
+
+UUIDGenerator::UUIDGenerator() {
+ char localHostName[64];
+ gethostname(localHostName, sizeof(localHostName));
+ hostname_.assign(localHostName);
+ srand(time(NULL));
+}
+
+string
+UUIDGenerator::getGuid() const {
+ string ret(hostname_);
+ ret += ":";
+ ret += timestamp();
+ ret += ":";
+ ret += rand();
+ return ret;
+}
+
+string
+UUIDGenerator::timestamp() const {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ stringstream ret;
+ ret << tv.tv_sec;
+ ret << ".";
+ ret << tv.tv_usec;
+ return ret.str();
+}
+
+string
+UUIDGenerator::rand() const {
+ stringstream ret;
+ ret << ::rand();
+ return ret.str();
+}
Propchange: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h (added)
+++ incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h Mon Jul 31 02:36:40 2006
@@ -0,0 +1,38 @@
+/*
+ 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.
+*/
+
+#ifndef ACTIVEMQ_UUID_GENERATOR_H
+#define ACTIVEMQ_UUID_GENERATOR_H
+
+#include <string>
+
+namespace ActiveMQ {
+ class UUIDGenerator {
+ public:
+ UUIDGenerator();
+ std::string getGuid() const;
+ private:
+ std::string timestamp() const;
+ std::string rand() const;
+
+ std::string hostname_;
+ };
+};
+
+#endif // ACTIVEMQ_UUID_GENERATOR_H
Propchange: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_corelib/UUIDGenerator.h
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_examples/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/Makefile.am?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/Makefile.am (added)
+++ incubator/activemq/trunk/amazon/amq_examples/Makefile.am Mon Jul 31 02:36:40 2006
@@ -0,0 +1 @@
+SUBDIRS = bs_async_recv bs_send bs_sync_recv cl_send
Added: incubator/activemq/trunk/amazon/amq_examples/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/Makefile.in?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/Makefile.in (added)
+++ incubator/activemq/trunk/amazon/amq_examples/Makefile.in Mon Jul 31 02:36:40 2006
@@ -0,0 +1,465 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = amq_examples
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-exec-recursive install-info-recursive \
+ install-recursive installcheck-recursive installdirs-recursive \
+ pdf-recursive ps-recursive uninstall-info-recursive \
+ uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = bs_async_recv bs_send bs_sync_recv cl_send
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign amq_examples/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign amq_examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(mkdir_p) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+ clean clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.am?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.am (added)
+++ incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.am Mon Jul 31 02:36:40 2006
@@ -0,0 +1,4 @@
+INCLUDES = -I../../
+bin_PROGRAMS = brokersession_example_receiver_async
+brokersession_example_receiver_async_SOURCES = brokersession_example_receiver_async.cpp
+brokersession_example_receiver_async_LDADD = -L../../amq_brokersession -lamq_brokersession
Added: incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.in
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.in?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.in (added)
+++ incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/Makefile.in Mon Jul 31 02:36:40 2006
@@ -0,0 +1,445 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = brokersession_example_receiver_async$(EXEEXT)
+subdir = amq_examples/bs_async_recv
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_brokersession_example_receiver_async_OBJECTS = \
+ brokersession_example_receiver_async.$(OBJEXT)
+brokersession_example_receiver_async_OBJECTS = \
+ $(am_brokersession_example_receiver_async_OBJECTS)
+brokersession_example_receiver_async_DEPENDENCIES =
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(brokersession_example_receiver_async_SOURCES)
+DIST_SOURCES = $(brokersession_example_receiver_async_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = -I../../
+brokersession_example_receiver_async_SOURCES = brokersession_example_receiver_async.cpp
+brokersession_example_receiver_async_LDADD = -L../../amq_brokersession -lamq_brokersession
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign amq_examples/bs_async_recv/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign amq_examples/bs_async_recv/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+brokersession_example_receiver_async$(EXEEXT): $(brokersession_example_receiver_async_OBJECTS) $(brokersession_example_receiver_async_DEPENDENCIES)
+ @rm -f brokersession_example_receiver_async$(EXEEXT)
+ $(CXXLINK) $(brokersession_example_receiver_async_LDFLAGS) $(brokersession_example_receiver_async_OBJECTS) $(brokersession_example_receiver_async_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/brokersession_example_receiver_async.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp (added)
+++ incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp Mon Jul 31 02:36:40 2006
@@ -0,0 +1,82 @@
+/*
+ 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 <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include <iostream>
+#include <memory>
+
+#include "amq_brokersession/BrokerSession.h"
+#include "amq_corelib/NonBlockingMessageConsumerRef.h"
+#include "amq_corelib/TextMessage.h"
+
+using namespace std;
+using namespace ActiveMQ;
+
+void callback(auto_ptr<Message> msg) {
+ cout << "Received message: " << static_cast<TextMessage *>(msg.get())->getText() << endl;
+}
+
+int main(int argc, char **argv) {
+ if (argc < 2) {
+ cerr << "Usage: brokersession_example_receiver_async <broker_uri>" << endl;
+ return 1;
+ }
+ try {
+ BrokerSession bs(argv[1]);
+ bs.connect();
+
+ NonBlockingMessageConsumerRef smc;
+
+ smc = bs.newNonBlockingMessageConsumer();
+
+ smc.getEventFD();
+
+ Destination d = bs.createTopic("test");
+ bs.subscribe(d, smc);
+
+ sleep(2);
+
+ fd_set fds;
+ FD_ZERO(&fds);
+ while (1) {
+ FD_SET(smc.getEventFD(),&fds);
+ int rc = select(smc.getEventFD()+1,&fds,NULL,NULL,NULL);
+ if (rc == 1) {
+ auto_ptr<Message> m = smc.receive();
+ callback(m);
+ }
+ else if (rc == -1 && errno != EINTR) {
+ perror("select");
+ return 1;
+ }
+ }
+ } catch (const Exception &e) {
+ cerr << "Exception: " << e.what() << endl;
+ return 1;
+ } catch (...) {
+ cerr << "Some random exception!" << endl;
+ }
+
+ return 0;
+}
Propchange: incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/amazon/amq_examples/bs_async_recv/brokersession_example_receiver_async.cpp
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/activemq/trunk/amazon/amq_examples/bs_send/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/amazon/amq_examples/bs_send/Makefile.am?rev=427057&view=auto
==============================================================================
--- incubator/activemq/trunk/amazon/amq_examples/bs_send/Makefile.am (added)
+++ incubator/activemq/trunk/amazon/amq_examples/bs_send/Makefile.am Mon Jul 31 02:36:40 2006
@@ -0,0 +1,4 @@
+INCLUDES = -I../../
+bin_PROGRAMS = brokersession_example_sender
+brokersession_example_sender_SOURCES = brokersession_example_sender.cpp
+brokersession_example_sender_LDADD = -L../../amq_brokersession -lamq_brokersession