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:27:47 UTC
svn commit: r419365 [3/25] - in /incubator/activemq/trunk:
activemq-core/src/main/java/org/apache/activemq/thread/
activemq-core/src/test/java/org/apache/activemq/openwire/v1/
activemq-cpp/src/main/activemq/concurrent/
activemq-cpp/src/main/activemq/co...
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/Connector.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/Connector.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/Connector.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/Connector.h Wed Jul 5 15:27:34 2006
@@ -1,317 +1,317 @@
-/*
- * 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_CONNECTOR_CONNECTOR_H_
-#define _ACTIVEMQ_CONNECTOR_CONNECTOR_H_
-
-#include <list>
-
-#include <cms/Startable.h>
-#include <cms/Closeable.h>
-#include <cms/MessageListener.h>
-#include <cms/ExceptionListener.h>
-#include <cms/Topic.h>
-#include <cms/Queue.h>
-#include <cms/TemporaryTopic.h>
-#include <cms/TemporaryQueue.h>
-#include <cms/Session.h>
-#include <cms/BytesMessage.h>
-#include <cms/TextMessage.h>
-#include <cms/MapMessage.h>
-
-#include <activemq/exceptions/InvalidStateException.h>
-
-#include <activemq/transport/Transport.h>
-#include <activemq/connector/SessionInfo.h>
-#include <activemq/connector/ConsumerInfo.h>
-#include <activemq/connector/ProducerInfo.h>
-#include <activemq/connector/TransactionInfo.h>
-#include <activemq/connector/ConsumerMessageListener.h>
-#include <activemq/connector/ConnectorException.h>
-
-namespace activemq{
-namespace connector{
-
- // Forward declarations.
- class Connector
- :
- public cms::Startable,
- public cms::Closeable
- {
- public: // Connector Types
-
- enum AckType
- {
- DeliveredAck = 0, // Message delivered but not consumed
- PoisonAck = 1, // Message could not be processed due to
- // poison pill but discard anyway
- ConsumedAck = 2 // Message consumed, discard
- };
-
- public:
-
- virtual ~Connector(void) {};
-
- /**
- * Gets the Client Id for this connection, if this
- * connection has been closed, then this method returns ""
- * @return Client Id String
- */
- virtual std::string getClientId(void) const = 0;
-
- /**
- * Gets a reference to the Transport that this connection
- * is using.
- * @param reference to a transport
- * @throws InvalidStateException if the Transport is not set
- */
- virtual transport::Transport& getTransport(void) const
- throw (exceptions::InvalidStateException ) = 0;
-
- /**
- * Creates a Session Info object for this connector
- * @param Acknowledgement Mode of the Session
- * @returns Session Info Object
- * @throws ConnectorException
- */
- virtual SessionInfo* createSession(
- cms::Session::AcknowledgeMode ackMode)
- throw( ConnectorException ) = 0;
-
- /**
- * Create a Consumer for the given Session
- * @param Destination to Subscribe to.
- * @param Session Information.
- * @return Consumer Information
- * @throws ConnectorException
- */
- virtual ConsumerInfo* createConsumer(
- cms::Destination* destination,
- SessionInfo* session,
- const std::string& selector = "")
- throw ( ConnectorException ) = 0;
-
- /**
- * Create a Durable Consumer for the given Session
- * @param Topic to Subscribe to.
- * @param Session Information.
- * @param name of the Durable Topic
- * @param Selector
- * @param if set, inhibits the delivery of messages
- * published by its own connection
- * @return Consumer Information
- * @throws ConnectorException
- */
- virtual ConsumerInfo* createDurableConsumer(
- cms::Topic* topic,
- SessionInfo* session,
- const std::string& name,
- const std::string& selector = "",
- bool noLocal = false)
- throw ( ConnectorException ) = 0;
-
- /**
- * Create a Consumer for the given Session
- * @param Destination to Subscribe to.
- * @param Session Information.
- * @return Producer Information
- * @throws ConnectorException
- */
- virtual ProducerInfo* createProducer(
- cms::Destination* destination,
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a Topic given a name and session info
- * @param Topic Name
- * @param Session Information
- * @return a newly created Topic Object
- * @throws ConnectorException
- */
- virtual cms::Topic* createTopic(const std::string& name,
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a Queue given a name and session info
- * @param Queue Name
- * @param Session Information
- * @return a newly created Queue Object
- * @throws ConnectorException
- */
- virtual cms::Queue* createQueue(const std::string& name,
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a Temporary Topic given a name and session info
- * @param Temporary Topic Name
- * @param Session Information
- * @return a newly created Temporary Topic Object
- * @throws ConnectorException
- */
- virtual cms::TemporaryTopic* createTemporaryTopic(
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a Temporary Queue given a name and session info
- * @param Temporary Queue Name
- * @param Session Information
- * @return a newly created Temporary Queue Object
- * @throws ConnectorException
- */
- virtual cms::TemporaryQueue* createTemporaryQueue(
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Sends a Message
- * @param The Message to send.
- * @param Producer Info for the sender of this message
- * @throws ConnectorException
- */
- virtual void send(cms::Message* message, ProducerInfo* producerInfo)
- throw ( ConnectorException ) = 0;
-
- /**
- * Sends a set of Messages
- * @param List of Messages to send.
- * @param Producer Info for the sender of this message
- * @throws ConnectorException
- */
- virtual void send(std::list<cms::Message*>& messages,
- ProducerInfo* producerInfo)
- throw ( ConnectorException ) = 0;
-
- /**
- * Acknowledges a Message
- * @param An ActiveMQMessage to Ack.
- * @throws ConnectorException
- */
- virtual void acknowledge(const SessionInfo* session,
- const cms::Message* message,
- AckType ackType = ConsumedAck)
- throw ( ConnectorException ) = 0;
-
- /**
- * Starts a new Transaction.
- * @param Session Information
- * @throws ConnectorException
- */
- virtual TransactionInfo* startTransaction(
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Commits a Transaction.
- * @param The Transaction information
- * @param Session Information
- * @throws ConnectorException
- */
- virtual void commit(TransactionInfo* transaction,
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Rolls back a Transaction.
- * @param The Transaction information
- * @param Session Information
- * @throws ConnectorException
- */
- virtual void rollback(TransactionInfo* transaction,
- SessionInfo* session)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a new Message.
- * @param Session Information
- * @param Transaction Info for this Message
- * @throws ConnectorException
- */
- virtual cms::Message* createMessage(
- SessionInfo* session,
- TransactionInfo* transaction)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a new BytesMessage.
- * @param Session Information
- * @param Transaction Info for this Message
- * @throws ConnectorException
- */
- virtual cms::BytesMessage* createBytesMessage(
- SessionInfo* session,
- TransactionInfo* transaction)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a new TextMessage.
- * @param Session Information
- * @param Transaction Info for this Message
- * @throws ConnectorException
- */
- virtual cms::TextMessage* createTextMessage(
- SessionInfo* session,
- TransactionInfo* transaction)
- throw ( ConnectorException ) = 0;
-
- /**
- * Creates a new MapMessage.
- * @param Session Information
- * @param Transaction Info for this Message
- * @throws ConnectorException
- */
- virtual cms::MapMessage* createMapMessage(
- SessionInfo* session,
- TransactionInfo* transaction)
- throw ( ConnectorException ) = 0;
-
- /**
- * Unsubscribe from a givenDurable Subscription
- * @param name of the Subscription
- * @throws ConnectorException
- */
- virtual void unsubscribe(const std::string& name)
- throw ( ConnectorException ) = 0;
-
- /**
- * Destroys the given connector resource.
- * @param resource the resource to be destroyed.
- * @throws ConnectorException
- */
- virtual void destroyResource( ConnectorResource* resource )
- throw ( ConnectorException ) = 0;
-
- /**
- * Sets the listener of consumer messages.
- * @param listener the observer.
- */
- virtual void setConsumerMessageListener(
- ConsumerMessageListener* listener) = 0;
-
- /**
- * Sets the Listner of exceptions for this connector
- * @param ExceptionListener the observer.
- */
- virtual void setExceptionListener(
- cms::ExceptionListener* listener) = 0;
- };
-
-}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_CONNECTOR_H_*/
+/*
+ * 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_CONNECTOR_CONNECTOR_H_
+#define _ACTIVEMQ_CONNECTOR_CONNECTOR_H_
+
+#include <list>
+
+#include <cms/Startable.h>
+#include <cms/Closeable.h>
+#include <cms/MessageListener.h>
+#include <cms/ExceptionListener.h>
+#include <cms/Topic.h>
+#include <cms/Queue.h>
+#include <cms/TemporaryTopic.h>
+#include <cms/TemporaryQueue.h>
+#include <cms/Session.h>
+#include <cms/BytesMessage.h>
+#include <cms/TextMessage.h>
+#include <cms/MapMessage.h>
+
+#include <activemq/exceptions/InvalidStateException.h>
+
+#include <activemq/transport/Transport.h>
+#include <activemq/connector/SessionInfo.h>
+#include <activemq/connector/ConsumerInfo.h>
+#include <activemq/connector/ProducerInfo.h>
+#include <activemq/connector/TransactionInfo.h>
+#include <activemq/connector/ConsumerMessageListener.h>
+#include <activemq/connector/ConnectorException.h>
+
+namespace activemq{
+namespace connector{
+
+ // Forward declarations.
+ class Connector
+ :
+ public cms::Startable,
+ public cms::Closeable
+ {
+ public: // Connector Types
+
+ enum AckType
+ {
+ DeliveredAck = 0, // Message delivered but not consumed
+ PoisonAck = 1, // Message could not be processed due to
+ // poison pill but discard anyway
+ ConsumedAck = 2 // Message consumed, discard
+ };
+
+ public:
+
+ virtual ~Connector(void) {};
+
+ /**
+ * Gets the Client Id for this connection, if this
+ * connection has been closed, then this method returns ""
+ * @return Client Id String
+ */
+ virtual std::string getClientId(void) const = 0;
+
+ /**
+ * Gets a reference to the Transport that this connection
+ * is using.
+ * @param reference to a transport
+ * @throws InvalidStateException if the Transport is not set
+ */
+ virtual transport::Transport& getTransport(void) const
+ throw (exceptions::InvalidStateException ) = 0;
+
+ /**
+ * Creates a Session Info object for this connector
+ * @param Acknowledgement Mode of the Session
+ * @returns Session Info Object
+ * @throws ConnectorException
+ */
+ virtual SessionInfo* createSession(
+ cms::Session::AcknowledgeMode ackMode)
+ throw( ConnectorException ) = 0;
+
+ /**
+ * Create a Consumer for the given Session
+ * @param Destination to Subscribe to.
+ * @param Session Information.
+ * @return Consumer Information
+ * @throws ConnectorException
+ */
+ virtual ConsumerInfo* createConsumer(
+ cms::Destination* destination,
+ SessionInfo* session,
+ const std::string& selector = "")
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Create a Durable Consumer for the given Session
+ * @param Topic to Subscribe to.
+ * @param Session Information.
+ * @param name of the Durable Topic
+ * @param Selector
+ * @param if set, inhibits the delivery of messages
+ * published by its own connection
+ * @return Consumer Information
+ * @throws ConnectorException
+ */
+ virtual ConsumerInfo* createDurableConsumer(
+ cms::Topic* topic,
+ SessionInfo* session,
+ const std::string& name,
+ const std::string& selector = "",
+ bool noLocal = false)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Create a Consumer for the given Session
+ * @param Destination to Subscribe to.
+ * @param Session Information.
+ * @return Producer Information
+ * @throws ConnectorException
+ */
+ virtual ProducerInfo* createProducer(
+ cms::Destination* destination,
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a Topic given a name and session info
+ * @param Topic Name
+ * @param Session Information
+ * @return a newly created Topic Object
+ * @throws ConnectorException
+ */
+ virtual cms::Topic* createTopic(const std::string& name,
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a Queue given a name and session info
+ * @param Queue Name
+ * @param Session Information
+ * @return a newly created Queue Object
+ * @throws ConnectorException
+ */
+ virtual cms::Queue* createQueue(const std::string& name,
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a Temporary Topic given a name and session info
+ * @param Temporary Topic Name
+ * @param Session Information
+ * @return a newly created Temporary Topic Object
+ * @throws ConnectorException
+ */
+ virtual cms::TemporaryTopic* createTemporaryTopic(
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a Temporary Queue given a name and session info
+ * @param Temporary Queue Name
+ * @param Session Information
+ * @return a newly created Temporary Queue Object
+ * @throws ConnectorException
+ */
+ virtual cms::TemporaryQueue* createTemporaryQueue(
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Sends a Message
+ * @param The Message to send.
+ * @param Producer Info for the sender of this message
+ * @throws ConnectorException
+ */
+ virtual void send(cms::Message* message, ProducerInfo* producerInfo)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Sends a set of Messages
+ * @param List of Messages to send.
+ * @param Producer Info for the sender of this message
+ * @throws ConnectorException
+ */
+ virtual void send(std::list<cms::Message*>& messages,
+ ProducerInfo* producerInfo)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Acknowledges a Message
+ * @param An ActiveMQMessage to Ack.
+ * @throws ConnectorException
+ */
+ virtual void acknowledge(const SessionInfo* session,
+ const cms::Message* message,
+ AckType ackType = ConsumedAck)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Starts a new Transaction.
+ * @param Session Information
+ * @throws ConnectorException
+ */
+ virtual TransactionInfo* startTransaction(
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Commits a Transaction.
+ * @param The Transaction information
+ * @param Session Information
+ * @throws ConnectorException
+ */
+ virtual void commit(TransactionInfo* transaction,
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Rolls back a Transaction.
+ * @param The Transaction information
+ * @param Session Information
+ * @throws ConnectorException
+ */
+ virtual void rollback(TransactionInfo* transaction,
+ SessionInfo* session)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a new Message.
+ * @param Session Information
+ * @param Transaction Info for this Message
+ * @throws ConnectorException
+ */
+ virtual cms::Message* createMessage(
+ SessionInfo* session,
+ TransactionInfo* transaction)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a new BytesMessage.
+ * @param Session Information
+ * @param Transaction Info for this Message
+ * @throws ConnectorException
+ */
+ virtual cms::BytesMessage* createBytesMessage(
+ SessionInfo* session,
+ TransactionInfo* transaction)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a new TextMessage.
+ * @param Session Information
+ * @param Transaction Info for this Message
+ * @throws ConnectorException
+ */
+ virtual cms::TextMessage* createTextMessage(
+ SessionInfo* session,
+ TransactionInfo* transaction)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Creates a new MapMessage.
+ * @param Session Information
+ * @param Transaction Info for this Message
+ * @throws ConnectorException
+ */
+ virtual cms::MapMessage* createMapMessage(
+ SessionInfo* session,
+ TransactionInfo* transaction)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Unsubscribe from a givenDurable Subscription
+ * @param name of the Subscription
+ * @throws ConnectorException
+ */
+ virtual void unsubscribe(const std::string& name)
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Destroys the given connector resource.
+ * @param resource the resource to be destroyed.
+ * @throws ConnectorException
+ */
+ virtual void destroyResource( ConnectorResource* resource )
+ throw ( ConnectorException ) = 0;
+
+ /**
+ * Sets the listener of consumer messages.
+ * @param listener the observer.
+ */
+ virtual void setConsumerMessageListener(
+ ConsumerMessageListener* listener) = 0;
+
+ /**
+ * Sets the Listner of exceptions for this connector
+ * @param ExceptionListener the observer.
+ */
+ virtual void setExceptionListener(
+ cms::ExceptionListener* listener) = 0;
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_CONNECTOR_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/Connector.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorException.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorException.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorException.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorException.h Wed Jul 5 15:27:34 2006
@@ -1,64 +1,64 @@
-/*
- * 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 CONNECTOREXCEPTION_H_
-#define CONNECTOREXCEPTION_H_
-
-#include <activemq/exceptions/ActiveMQException.h>
-
-namespace activemq{
-namespace connector{
-
- /*
- * Signals that an Connector exception of some sort has occurred.
- */
- class ConnectorException : public exceptions::ActiveMQException
- {
- public:
-
- ConnectorException() {}
- ConnectorException( const exceptions::ActiveMQException& ex ){
- *(ActiveMQException*)this = ex;
- }
- ConnectorException( const ConnectorException& ex ){
- *(exceptions::ActiveMQException*)this = ex;
- }
- ConnectorException(const char* file, const int lineNumber,
- const char* msg, ...)
- {
- va_list vargs ;
- va_start(vargs, msg) ;
- buildMessage(msg, vargs) ;
-
- // Set the first mark for this exception.
- setMark( file, lineNumber );
- }
-
- /**
- * Clones this exception. This is useful for cases where you need
- * to preserve the type of the original exception as well as the message.
- * All subclasses should override.
- */
- virtual exceptions::ActiveMQException* clone() const{
- return new ConnectorException( *this );
- }
- virtual ~ConnectorException() {}
-
- };
-
-}}
-
-#endif /*CONNECTOREXCEPTION_H_*/
+/*
+ * 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 CONNECTOREXCEPTION_H_
+#define CONNECTOREXCEPTION_H_
+
+#include <activemq/exceptions/ActiveMQException.h>
+
+namespace activemq{
+namespace connector{
+
+ /*
+ * Signals that an Connector exception of some sort has occurred.
+ */
+ class ConnectorException : public exceptions::ActiveMQException
+ {
+ public:
+
+ ConnectorException() {}
+ ConnectorException( const exceptions::ActiveMQException& ex ){
+ *(ActiveMQException*)this = ex;
+ }
+ ConnectorException( const ConnectorException& ex ){
+ *(exceptions::ActiveMQException*)this = ex;
+ }
+ ConnectorException(const char* file, const int lineNumber,
+ const char* msg, ...)
+ {
+ va_list vargs ;
+ va_start(vargs, msg) ;
+ buildMessage(msg, vargs) ;
+
+ // Set the first mark for this exception.
+ setMark( file, lineNumber );
+ }
+
+ /**
+ * Clones this exception. This is useful for cases where you need
+ * to preserve the type of the original exception as well as the message.
+ * All subclasses should override.
+ */
+ virtual exceptions::ActiveMQException* clone() const{
+ return new ConnectorException( *this );
+ }
+ virtual ~ConnectorException() {}
+
+ };
+
+}}
+
+#endif /*CONNECTOREXCEPTION_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorException.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactory.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactory.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactory.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactory.h Wed Jul 5 15:27:34 2006
@@ -1,48 +1,48 @@
-/*
- * 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 CONNECTORFACTORY_H_
-#define CONNECTORFACTORY_H_
-
-#include <activemq/util/Properties.h>
-#include <activemq/transport/Transport.h>
-#include <activemq/connector/Connector.h>
-
-namespace activemq{
-namespace connector{
-
- /**
- * Interface class for all Connector Factory Classes
- */
- class ConnectorFactory
- {
- public:
-
- virtual ~ConnectorFactory(void) {};
-
- /**
- * Creates a connector
- * @param The Properties that the new connector is configured with
- */
- virtual Connector* createConnector(
- const activemq::util::Properties& properties,
- activemq::transport::Transport* transport) = 0;
-
- };
-
-}}
-
-#endif /*CONNECTORFACTORY_H_*/
+/*
+ * 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 CONNECTORFACTORY_H_
+#define CONNECTORFACTORY_H_
+
+#include <activemq/util/Properties.h>
+#include <activemq/transport/Transport.h>
+#include <activemq/connector/Connector.h>
+
+namespace activemq{
+namespace connector{
+
+ /**
+ * Interface class for all Connector Factory Classes
+ */
+ class ConnectorFactory
+ {
+ public:
+
+ virtual ~ConnectorFactory(void) {};
+
+ /**
+ * Creates a connector
+ * @param The Properties that the new connector is configured with
+ */
+ virtual Connector* createConnector(
+ const activemq::util::Properties& properties,
+ activemq::transport::Transport* transport) = 0;
+
+ };
+
+}}
+
+#endif /*CONNECTORFACTORY_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactory.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.cpp?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.cpp (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.cpp Wed Jul 5 15:27:34 2006
@@ -1,74 +1,74 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <activemq/connector/ConnectorFactoryMap.h>
-
-using namespace activemq;
-using namespace activemq::connector;
-
-////////////////////////////////////////////////////////////////////////////////
-ConnectorFactoryMap* ConnectorFactoryMap::getInstance(void)
-{
- // Static instance of this Map, create here so that one will
- // always exist, the one and only Connector Map.
- static ConnectorFactoryMap instance;
-
- return &instance;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ConnectorFactoryMap::registerConnectorFactory(const std::string& name,
- ConnectorFactory* factory)
-{
- factoryMap[name] = factory;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ConnectorFactoryMap::unregisterConnectorFactory(const std::string& name)
-{
- factoryMap.erase(name);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-ConnectorFactory* ConnectorFactoryMap::lookup(const std::string& name)
-{
- std::map<std::string, ConnectorFactory*>::const_iterator itr =
- factoryMap.find(name);
-
- if(itr != factoryMap.end())
- {
- return itr->second;
- }
-
- // Didn't find it, return nothing, not a single thing.
- return NULL;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-std::size_t ConnectorFactoryMap::getFactoryNames(
- std::vector<std::string>& factoryList)
-{
- std::map<std::string, ConnectorFactory*>::const_iterator itr =
- factoryMap.begin();
-
- for(; itr != factoryMap.end(); ++itr)
- {
- factoryList.insert(factoryList.end(), itr->first);
- }
-
- return factoryMap.size();
-}
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/connector/ConnectorFactoryMap.h>
+
+using namespace activemq;
+using namespace activemq::connector;
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectorFactoryMap* ConnectorFactoryMap::getInstance(void)
+{
+ // Static instance of this Map, create here so that one will
+ // always exist, the one and only Connector Map.
+ static ConnectorFactoryMap instance;
+
+ return &instance;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectorFactoryMap::registerConnectorFactory(const std::string& name,
+ ConnectorFactory* factory)
+{
+ factoryMap[name] = factory;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectorFactoryMap::unregisterConnectorFactory(const std::string& name)
+{
+ factoryMap.erase(name);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectorFactory* ConnectorFactoryMap::lookup(const std::string& name)
+{
+ std::map<std::string, ConnectorFactory*>::const_iterator itr =
+ factoryMap.find(name);
+
+ if(itr != factoryMap.end())
+ {
+ return itr->second;
+ }
+
+ // Didn't find it, return nothing, not a single thing.
+ return NULL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::size_t ConnectorFactoryMap::getFactoryNames(
+ std::vector<std::string>& factoryList)
+{
+ std::map<std::string, ConnectorFactory*>::const_iterator itr =
+ factoryMap.begin();
+
+ for(; itr != factoryMap.end(); ++itr)
+ {
+ factoryList.insert(factoryList.end(), itr->first);
+ }
+
+ return factoryMap.size();
+}
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.h Wed Jul 5 15:27:34 2006
@@ -1,93 +1,93 @@
-/*
- * 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 CONNECTORFACTORYMAP_H_
-#define CONNECTORFACTORYMAP_H_
-
-#include <map>
-#include <vector>
-#include <string>
-
-#include <activemq/exceptions/ActiveMQException.h>
-#include <activemq/connector/ConnectorFactory.h>
-
-namespace activemq{
-namespace connector{
-
- /**
- * Lookup Map for Connector Factories. Use the Connector name to
- * find the associated factory. This class does not take ownership
- * of the stored factories, they must be deallocated somewhere.
- */
- class ConnectorFactoryMap
- {
- public:
-
- /**
- * Gets a singleton instance of this class.
- */
- static ConnectorFactoryMap* getInstance(void);
-
- /**
- * Registers a new Connector Factory with this map
- * @param name to associate the factory with
- * @param factory to store.
- */
- void registerConnectorFactory(const std::string& name,
- ConnectorFactory* factory);
-
- /**
- * Unregisters a Connector Factory with this map
- * @param name of the factory to remove
- */
- void unregisterConnectorFactory(const std::string& name);
-
- /**
- * Lookup the named factory in the Map
- * @param the factory name to lookup
- * @return the factory assciated with the name, or NULL
- */
- ConnectorFactory* lookup(const std::string& name);
-
- /**
- * Fetch a list of factory names that this Map contains
- * @param vector object to receive the list
- * @returns count of factories.
- */
- std::size_t getFactoryNames(std::vector<std::string>& factoryList);
-
- private:
-
- // Hidden Contrustor, prevents instantiation
- ConnectorFactoryMap() {};
-
- // Hidden Destructor.
- virtual ~ConnectorFactoryMap() {};
-
- // Hidden Copy Constructore
- ConnectorFactoryMap(const ConnectorFactoryMap& factoryMap);
-
- // Hidden Assignment operator
- ConnectorFactoryMap operator=(const ConnectorFactoryMap& factoryMap);
-
- // Map of Factories
- std::map<std::string, ConnectorFactory*> factoryMap;
-
- };
-
-}}
-
-#endif /*CONNECTORFACTORYMAP_H_*/
+/*
+ * 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 CONNECTORFACTORYMAP_H_
+#define CONNECTORFACTORYMAP_H_
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/connector/ConnectorFactory.h>
+
+namespace activemq{
+namespace connector{
+
+ /**
+ * Lookup Map for Connector Factories. Use the Connector name to
+ * find the associated factory. This class does not take ownership
+ * of the stored factories, they must be deallocated somewhere.
+ */
+ class ConnectorFactoryMap
+ {
+ public:
+
+ /**
+ * Gets a singleton instance of this class.
+ */
+ static ConnectorFactoryMap* getInstance(void);
+
+ /**
+ * Registers a new Connector Factory with this map
+ * @param name to associate the factory with
+ * @param factory to store.
+ */
+ void registerConnectorFactory(const std::string& name,
+ ConnectorFactory* factory);
+
+ /**
+ * Unregisters a Connector Factory with this map
+ * @param name of the factory to remove
+ */
+ void unregisterConnectorFactory(const std::string& name);
+
+ /**
+ * Lookup the named factory in the Map
+ * @param the factory name to lookup
+ * @return the factory assciated with the name, or NULL
+ */
+ ConnectorFactory* lookup(const std::string& name);
+
+ /**
+ * Fetch a list of factory names that this Map contains
+ * @param vector object to receive the list
+ * @returns count of factories.
+ */
+ std::size_t getFactoryNames(std::vector<std::string>& factoryList);
+
+ private:
+
+ // Hidden Contrustor, prevents instantiation
+ ConnectorFactoryMap() {};
+
+ // Hidden Destructor.
+ virtual ~ConnectorFactoryMap() {};
+
+ // Hidden Copy Constructore
+ ConnectorFactoryMap(const ConnectorFactoryMap& factoryMap);
+
+ // Hidden Assignment operator
+ ConnectorFactoryMap operator=(const ConnectorFactoryMap& factoryMap);
+
+ // Map of Factories
+ std::map<std::string, ConnectorFactory*> factoryMap;
+
+ };
+
+}}
+
+#endif /*CONNECTORFACTORYMAP_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMap.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMapRegistrar.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMapRegistrar.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMapRegistrar.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMapRegistrar.h Wed Jul 5 15:27:34 2006
@@ -1,90 +1,90 @@
-/*
- * 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 CONNECTORFACTORYMAPREGISTRAR_H_
-#define CONNECTORFACTORYMAPREGISTRAR_H_
-
-#include <string>
-
-#include <activemq/connector/ConnectorFactoryMap.h>
-
-namespace activemq{
-namespace connector{
-
- /**
- * Registers the passed in factory into the factory map, this class
- * can manage the lifetime of the registered factory (default behaviour).
- */
- class ConnectorFactoryMapRegistrar
- {
- public:
-
- /**
- * Constructor for this class
- * @param name of the factory to register
- * @param the factory
- * @param boolean indicating if this object manages the lifetime of
- * the factory that is being registered.
- */
- ConnectorFactoryMapRegistrar( const std::string& name,
- ConnectorFactory* factory,
- bool manageLifetime = true )
- {
- // Register it in the map.
- ConnectorFactoryMap::getInstance()->
- registerConnectorFactory(name, factory);
-
- // Store for later deletion
- this->factory = factory;
- this->manageLifetime = manageLifetime;
- this->name = name;
- }
-
- virtual ~ConnectorFactoryMapRegistrar(void)
- {
- try
- {
- // UnRegister it in the map.
- ConnectorFactoryMap::getInstance()->
- unregisterConnectorFactory(name);
-
- if(manageLifetime)
- {
- delete factory;
- }
- }
- catch(...) {}
- }
-
- /**
- * get a reference to the factory that this class is holding
- * @return reference to a factory class
- */
- virtual ConnectorFactory& getFactory(void) {
- return *factory;
- }
-
- private:
-
- std::string name;
- ConnectorFactory* factory;
- bool manageLifetime;
-
- };
-
-}}
-
-#endif /*CONNECTORFACTORYMAPREGISTRAR_H_*/
+/*
+ * 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 CONNECTORFACTORYMAPREGISTRAR_H_
+#define CONNECTORFACTORYMAPREGISTRAR_H_
+
+#include <string>
+
+#include <activemq/connector/ConnectorFactoryMap.h>
+
+namespace activemq{
+namespace connector{
+
+ /**
+ * Registers the passed in factory into the factory map, this class
+ * can manage the lifetime of the registered factory (default behaviour).
+ */
+ class ConnectorFactoryMapRegistrar
+ {
+ public:
+
+ /**
+ * Constructor for this class
+ * @param name of the factory to register
+ * @param the factory
+ * @param boolean indicating if this object manages the lifetime of
+ * the factory that is being registered.
+ */
+ ConnectorFactoryMapRegistrar( const std::string& name,
+ ConnectorFactory* factory,
+ bool manageLifetime = true )
+ {
+ // Register it in the map.
+ ConnectorFactoryMap::getInstance()->
+ registerConnectorFactory(name, factory);
+
+ // Store for later deletion
+ this->factory = factory;
+ this->manageLifetime = manageLifetime;
+ this->name = name;
+ }
+
+ virtual ~ConnectorFactoryMapRegistrar(void)
+ {
+ try
+ {
+ // UnRegister it in the map.
+ ConnectorFactoryMap::getInstance()->
+ unregisterConnectorFactory(name);
+
+ if(manageLifetime)
+ {
+ delete factory;
+ }
+ }
+ catch(...) {}
+ }
+
+ /**
+ * get a reference to the factory that this class is holding
+ * @return reference to a factory class
+ */
+ virtual ConnectorFactory& getFactory(void) {
+ return *factory;
+ }
+
+ private:
+
+ std::string name;
+ ConnectorFactory* factory;
+ bool manageLifetime;
+
+ };
+
+}}
+
+#endif /*CONNECTORFACTORYMAPREGISTRAR_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorFactoryMapRegistrar.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConnectorResource.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h Wed Jul 5 15:27:34 2006
@@ -1,89 +1,89 @@
-/*
- * Copyright 2006 The Apache Software Foundation or its licensors, as
- * applicable.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef _ACTIVEMQ_CONNECTOR_CONSUMERINFO_H_
-#define _ACTIVEMQ_CONNECTOR_CONSUMERINFO_H_
-
-#include <activemq/connector/ConnectorResource.h>
-#include <activemq/connector/SessionInfo.h>
-#include <cms/Destination.h>
-#include <string>
-
-namespace activemq{
-namespace connector{
-
- class ConsumerInfo : public ConnectorResource
- {
- public:
-
- /**
- * Destructor
- */
- virtual ~ConsumerInfo(void) {}
-
- /**
- * Gets this message consumer's message selector expression.
- * @return This Consumer's selector expression or "".
- */
- virtual const std::string& getMessageSelector(void) const = 0;
-
- /**
- * Sets this message consumer's message selector expression.
- * @param This Consumer's selector expression or "".
- */
- virtual void setMessageSelector( const std::string& selector ) = 0;
-
- /**
- * Gets the ID that is assigned to this consumer
- * @return value of the Consumer Id.
- */
- virtual unsigned int getConsumerId(void) const = 0;
-
- /**
- * Sets the ID that is assigned to this consumer
- * @return string value of the Consumer Id.
- */
- virtual void setConsumerId( const unsigned int id ) = 0;
-
- /**
- * Gets the Destination that this Consumer is subscribed on
- * @return Destination
- */
- virtual const cms::Destination& getDestination(void) const = 0;
-
- /**
- * Sets the destination that this Consumer is listening on
- * @param Destination
- */
- virtual void setDestination( const cms::Destination& destination ) = 0;
-
- /**
- * Gets the Session Info that this consumer is attached too
- * @return SessionnInfo pointer
- */
- virtual const SessionInfo* getSessionInfo(void) const = 0;
-
- /**
- * Gets the Session Info that this consumer is attached too
- * @return SessionnInfo pointer
- */
- virtual void setSessionInfo( const SessionInfo* session ) = 0;
-
- };
-
-}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_CONSUMERINFO_H_*/
+/*
+ * 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_CONNECTOR_CONSUMERINFO_H_
+#define _ACTIVEMQ_CONNECTOR_CONSUMERINFO_H_
+
+#include <activemq/connector/ConnectorResource.h>
+#include <activemq/connector/SessionInfo.h>
+#include <cms/Destination.h>
+#include <string>
+
+namespace activemq{
+namespace connector{
+
+ class ConsumerInfo : public ConnectorResource
+ {
+ public:
+
+ /**
+ * Destructor
+ */
+ virtual ~ConsumerInfo(void) {}
+
+ /**
+ * Gets this message consumer's message selector expression.
+ * @return This Consumer's selector expression or "".
+ */
+ virtual const std::string& getMessageSelector(void) const = 0;
+
+ /**
+ * Sets this message consumer's message selector expression.
+ * @param This Consumer's selector expression or "".
+ */
+ virtual void setMessageSelector( const std::string& selector ) = 0;
+
+ /**
+ * Gets the ID that is assigned to this consumer
+ * @return value of the Consumer Id.
+ */
+ virtual unsigned int getConsumerId(void) const = 0;
+
+ /**
+ * Sets the ID that is assigned to this consumer
+ * @return string value of the Consumer Id.
+ */
+ virtual void setConsumerId( const unsigned int id ) = 0;
+
+ /**
+ * Gets the Destination that this Consumer is subscribed on
+ * @return Destination
+ */
+ virtual const cms::Destination& getDestination(void) const = 0;
+
+ /**
+ * Sets the destination that this Consumer is listening on
+ * @param Destination
+ */
+ virtual void setDestination( const cms::Destination& destination ) = 0;
+
+ /**
+ * Gets the Session Info that this consumer is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual const SessionInfo* getSessionInfo(void) const = 0;
+
+ /**
+ * Gets the Session Info that this consumer is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual void setSessionInfo( const SessionInfo* session ) = 0;
+
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_CONSUMERINFO_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerInfo.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h Wed Jul 5 15:27:34 2006
@@ -1,75 +1,75 @@
-/*
- * 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_CONNECTOR_PRODUCERINFO_H_
-#define _ACTIVEMQ_CONNECTOR_PRODUCERINFO_H_
-
-#include <cms/Destination.h>
-
-#include <activemq/connector/ConnectorResource.h>
-#include <activemq/connector/SessionInfo.h>
-
-namespace activemq{
-namespace connector{
-
- class ProducerInfo : public ConnectorResource
- {
- public:
-
- virtual ~ProducerInfo(void) {}
-
- /**
- * Retrieves the default destination that this producer
- * sends its messages to.
- * @return Destionation, owned by this object
- */
- virtual const cms::Destination& getDestination(void) const = 0;
-
- /**
- * Sets the Default Destination for this Producer
- * @param reference to a destination, copied internally
- */
- virtual void setDestination( const cms::Destination& dest ) = 0;
-
- /**
- * Gets the ID that is assigned to this Producer
- * @return value of the Producer Id.
- */
- virtual unsigned int getProducerId(void) const = 0;
-
- /**
- * Sets the ID that is assigned to this Producer
- * @return string value of the Producer Id.
- */
- virtual void setProducerId( const unsigned int id ) = 0;
-
- /**
- * Gets the Session Info that this consumer is attached too
- * @return SessionnInfo pointer
- */
- virtual const SessionInfo* getSessionInfo(void) const = 0;
-
- /**
- * Gets the Session Info that this consumer is attached too
- * @return SessionnInfo pointer
- */
- virtual void setSessionInfo( const SessionInfo* session ) = 0;
-
- };
-
-}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_PRODUCERINFO_H_*/
+/*
+ * 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_CONNECTOR_PRODUCERINFO_H_
+#define _ACTIVEMQ_CONNECTOR_PRODUCERINFO_H_
+
+#include <cms/Destination.h>
+
+#include <activemq/connector/ConnectorResource.h>
+#include <activemq/connector/SessionInfo.h>
+
+namespace activemq{
+namespace connector{
+
+ class ProducerInfo : public ConnectorResource
+ {
+ public:
+
+ virtual ~ProducerInfo(void) {}
+
+ /**
+ * Retrieves the default destination that this producer
+ * sends its messages to.
+ * @return Destionation, owned by this object
+ */
+ virtual const cms::Destination& getDestination(void) const = 0;
+
+ /**
+ * Sets the Default Destination for this Producer
+ * @param reference to a destination, copied internally
+ */
+ virtual void setDestination( const cms::Destination& dest ) = 0;
+
+ /**
+ * Gets the ID that is assigned to this Producer
+ * @return value of the Producer Id.
+ */
+ virtual unsigned int getProducerId(void) const = 0;
+
+ /**
+ * Sets the ID that is assigned to this Producer
+ * @return string value of the Producer Id.
+ */
+ virtual void setProducerId( const unsigned int id ) = 0;
+
+ /**
+ * Gets the Session Info that this consumer is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual const SessionInfo* getSessionInfo(void) const = 0;
+
+ /**
+ * Gets the Session Info that this consumer is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual void setSessionInfo( const SessionInfo* session ) = 0;
+
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_PRODUCERINFO_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/ProducerInfo.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h Wed Jul 5 15:27:34 2006
@@ -1,93 +1,93 @@
-/*
- * 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_CONNECTOR_SESSIONINFO_H_
-#define _ACTIVEMQ_CONNECTOR_SESSIONINFO_H_
-
-#include <activemq/connector/ConnectorResource.h>
-#include <activemq/connector/TransactionInfo.h>
-#include <cms/Session.h>
-
-namespace activemq{
-namespace connector{
-
- class SessionInfo : public ConnectorResource
- {
- public:
-
- /**
- * Destructor
- */
- virtual ~SessionInfo(void) {}
-
- /**
- * Gets the Connection Id of the Connection that this consumer is
- * using to receive its messages.
- * @return string value of the connection id
- */
- virtual const std::string& getConnectionId(void) const = 0;
-
- /**
- * Sets the Connection Id of the Connection that this consumer is
- * using to receive its messages.
- * @param string value of the connection id
- */
- virtual void setConnectionId( const std::string& id ) = 0;
-
- /**
- * Gets the Sessions Id value
- * @return id for this session
- */
- virtual unsigned int getSessionId(void) const = 0;
-
- /**
- * Sets the Session Id for this Session
- * @param integral id value for this session
- */
- virtual void setSessionId( const unsigned int id ) = 0;
-
- /**
- * Sets the Ack Mode of this Session Info object
- * @param Ack Mode
- */
- virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) = 0;
-
- /**
- * Gets the Ack Mode of this Session
- * @return Ack Mode
- */
- virtual cms::Session::AcknowledgeMode getAckMode(void) const = 0;
-
- /**
- * Gets the currently active transaction info, if this session is
- * transacted, returns NULL when not transacted. You must call
- * getAckMode and see if the session is transacted.
- * @return Transaction Id of current Transaction
- */
- virtual const TransactionInfo* getTransactionInfo(void) const = 0;
-
- /**
- * Sets the current transaction info for this session, this is nit
- * used when the session is not transacted.
- * @param Transaction Id
- */
- virtual void setTransactionInfo( const TransactionInfo* transaction ) = 0;
-
- };
-
-}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_SESSIONINFO_H_*/
+/*
+ * 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_CONNECTOR_SESSIONINFO_H_
+#define _ACTIVEMQ_CONNECTOR_SESSIONINFO_H_
+
+#include <activemq/connector/ConnectorResource.h>
+#include <activemq/connector/TransactionInfo.h>
+#include <cms/Session.h>
+
+namespace activemq{
+namespace connector{
+
+ class SessionInfo : public ConnectorResource
+ {
+ public:
+
+ /**
+ * Destructor
+ */
+ virtual ~SessionInfo(void) {}
+
+ /**
+ * Gets the Connection Id of the Connection that this consumer is
+ * using to receive its messages.
+ * @return string value of the connection id
+ */
+ virtual const std::string& getConnectionId(void) const = 0;
+
+ /**
+ * Sets the Connection Id of the Connection that this consumer is
+ * using to receive its messages.
+ * @param string value of the connection id
+ */
+ virtual void setConnectionId( const std::string& id ) = 0;
+
+ /**
+ * Gets the Sessions Id value
+ * @return id for this session
+ */
+ virtual unsigned int getSessionId(void) const = 0;
+
+ /**
+ * Sets the Session Id for this Session
+ * @param integral id value for this session
+ */
+ virtual void setSessionId( const unsigned int id ) = 0;
+
+ /**
+ * Sets the Ack Mode of this Session Info object
+ * @param Ack Mode
+ */
+ virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) = 0;
+
+ /**
+ * Gets the Ack Mode of this Session
+ * @return Ack Mode
+ */
+ virtual cms::Session::AcknowledgeMode getAckMode(void) const = 0;
+
+ /**
+ * Gets the currently active transaction info, if this session is
+ * transacted, returns NULL when not transacted. You must call
+ * getAckMode and see if the session is transacted.
+ * @return Transaction Id of current Transaction
+ */
+ virtual const TransactionInfo* getTransactionInfo(void) const = 0;
+
+ /**
+ * Sets the current transaction info for this session, this is nit
+ * used when the session is not transacted.
+ * @param Transaction Id
+ */
+ virtual void setTransactionInfo( const TransactionInfo* transaction ) = 0;
+
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_SESSIONINFO_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/SessionInfo.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h Wed Jul 5 15:27:34 2006
@@ -1,64 +1,64 @@
-/*
- * 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_CONNECTOR_TRANSACTIONINFO_H_
-#define _ACTIVEMQ_CONNECTOR_TRANSACTIONINFO_H_
-
-#include <activemq/connector/ConnectorResource.h>
-
-namespace activemq{
-namespace connector{
-
- class SessionInfo;
-
- class TransactionInfo : public ConnectorResource
- {
- public:
-
- /**
- * Destructor
- */
- virtual ~TransactionInfo(void) {}
-
- /**
- * Gets the Transction Id
- * @return unsigned int Id
- */
- virtual unsigned int getTransactionId(void) const = 0;
-
- /**
- * Sets the Transction Id
- * @param unsigned int Id
- */
- virtual void setTransactionId( const unsigned int id ) = 0;
-
- /**
- * Gets the Session Info that this transaction is attached too
- * @return SessionnInfo pointer
- */
- virtual const SessionInfo* getSessionInfo(void) const = 0;
-
- /**
- * Gets the Session Info that this transaction is attached too
- * @return SessionnInfo pointer
- */
- virtual void setSessionInfo( const SessionInfo* session ) = 0;
-
- };
-
-}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_TRANSACTIONINFO_H_*/
+/*
+ * 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_CONNECTOR_TRANSACTIONINFO_H_
+#define _ACTIVEMQ_CONNECTOR_TRANSACTIONINFO_H_
+
+#include <activemq/connector/ConnectorResource.h>
+
+namespace activemq{
+namespace connector{
+
+ class SessionInfo;
+
+ class TransactionInfo : public ConnectorResource
+ {
+ public:
+
+ /**
+ * Destructor
+ */
+ virtual ~TransactionInfo(void) {}
+
+ /**
+ * Gets the Transction Id
+ * @return unsigned int Id
+ */
+ virtual unsigned int getTransactionId(void) const = 0;
+
+ /**
+ * Sets the Transction Id
+ * @param unsigned int Id
+ */
+ virtual void setTransactionId( const unsigned int id ) = 0;
+
+ /**
+ * Gets the Session Info that this transaction is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual const SessionInfo* getSessionInfo(void) const = 0;
+
+ /**
+ * Gets the Session Info that this transaction is attached too
+ * @return SessionnInfo pointer
+ */
+ virtual void setSessionInfo( const SessionInfo* session ) = 0;
+
+ };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_TRANSACTIONINFO_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/TransactionInfo.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompCommandListener.h
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompCommandListener.h?rev=419365&r1=419364&r2=419365&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompCommandListener.h (original)
+++ incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompCommandListener.h Wed Jul 5 15:27:34 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_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_
-#define _ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_
-
-#include <activemq/connector/stomp/commands/StompCommand.h>
-#include <activemq/connector/stomp/StompConnectorException.h>
-
-namespace activemq{
-namespace connector{
-namespace stomp{
-
- /**
- * Interface class for object that with to register with the Stomp
- * Connector in order to process a Command that was received.
- */
- class StompCommandListener
- {
- public:
-
- virtual ~StompCommandListener(void) {}
-
- /**
- * Process the Stomp Command
- * @param command to process
- * @throw ConnterException
- */
- virtual void onStompCommand( commands::StompCommand* command )
- throw ( StompConnectorException ) = 0;
-
- };
-
-}}}
-
-#endif /*_ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_*/
+/*
+ * 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_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_
+#define _ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_
+
+#include <activemq/connector/stomp/commands/StompCommand.h>
+#include <activemq/connector/stomp/StompConnectorException.h>
+
+namespace activemq{
+namespace connector{
+namespace stomp{
+
+ /**
+ * Interface class for object that with to register with the Stomp
+ * Connector in order to process a Command that was received.
+ */
+ class StompCommandListener
+ {
+ public:
+
+ virtual ~StompCommandListener(void) {}
+
+ /**
+ * Process the Stomp Command
+ * @param command to process
+ * @throw ConnterException
+ */
+ virtual void onStompCommand( commands::StompCommand* command )
+ throw ( StompConnectorException ) = 0;
+
+ };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDLISTENER_H_*/
Propchange: incubator/activemq/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompCommandListener.h
------------------------------------------------------------------------------
svn:eol-style = native