activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r377433 [1/4] - in /incubator/activemq/trunk/openwire-cpp: ./ src/ src/command/ src/io/ src/marshal/ src/transport/ src/util/ src/util/ifr/ src/util/ifr/v1/
Date Mon, 13 Feb 2006 17:43:55 GMT
Author: chirino
Date: Mon Feb 13 09:43:48 2006
New Revision: 377433

URL: http://svn.apache.org/viewcvs?rev=377433&view=rev
Log:
Applied patch from http://issues.apache.org/jira/browse/GERONIMO-1623, Thanks Mats./activemq   Still need to setup a build system for this and have it dynamically download the smart pointer implemenation dependency (BSD lic.)

Added:
    incubator/activemq/trunk/openwire-cpp/
    incubator/activemq/trunk/openwire-cpp/src/
    incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/Connection.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/Connection.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ISession.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/Session.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/Session.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/TraceException.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/TraceException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/
    incubator/activemq/trunk/openwire-cpp/src/command/AbstractCommand.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/AbstractCommand.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQDestination.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQDestination.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQMessage.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQMessage.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQQueue.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQQueue.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQTextMessage.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQTextMessage.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQTopic.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ActiveMQTopic.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BaseCommand.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BaseCommand.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BrokerId.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BrokerId.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BrokerInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/BrokerInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConnectionId.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConnectionId.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConnectionInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConnectionInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConsumerId.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConsumerId.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConsumerInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ConsumerInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ExceptionResponse.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ExceptionResponse.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ICommand.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/IDataStructure.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/Message.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/Message.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/MessageAck.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/MessageAck.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ProducerId.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ProducerId.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ProducerInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/ProducerInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/RemoveInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/RemoveInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/Response.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/Response.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/SessionId.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/SessionId.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/SessionInfo.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/command/SessionInfo.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/
    incubator/activemq/trunk/openwire-cpp/src/io/BinaryReader.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/BinaryReader.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/BinaryWriter.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/IOException.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/IReader.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/IWriter.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryReader.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/io/SocketBinaryWriter.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/
    incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/AbstractCommandMarshaller.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerIdMarshaller.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/BrokerInfoMarshaller.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/marshal/CommandMarshallerRegistry.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/transport/
    incubator/activemq/trunk/openwire-cpp/src/transport/ITransport.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/transport/SocketTransport.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/transport/SocketTransport.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/
    incubator/activemq/trunk/openwire-cpp/src/util/Endian.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/Endian.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/Guid.cpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/Guid.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/SimpleMutex.hpp   (with props)
    incubator/activemq/trunk/openwire-cpp/src/util/ifr/
    incubator/activemq/trunk/openwire-cpp/src/util/ifr/v1/

Added: incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +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.
+ */
+#include "BrokerError.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+BrokerError::BrokerError()
+{
+}
+
+BrokerError::~BrokerError()
+{
+}
+
+p<string> BrokerError::getExceptionClass()
+{
+    return exceptionClass ;
+}
+
+void BrokerError::setExceptionClass(const char* exceptionClass)
+{
+    this->exceptionClass->assign(exceptionClass) ;
+}
+
+p<string> BrokerError::getStackTrace()
+{
+    return stackTrace ;
+}
+
+void BrokerError::setStackTrace(const char* stackTrace)
+{
+    this->stackTrace->assign(stackTrace) ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/BrokerError.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,56 @@
+/*
+ * 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 BrokerError_hpp_
+#define BrokerError_hpp_
+
+#include <string>
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr ;
+      using namespace std ;
+
+/*
+ * 
+ */
+class BrokerError
+{
+private:
+    p<string> exceptionClass ;
+    p<string> stackTrace ;
+
+public:
+    BrokerError() ;
+    virtual ~BrokerError() ;
+
+    virtual p<string> getExceptionClass() ;
+    virtual void setExceptionClass(const char* exceptionClass) ;
+    virtual p<string> getStackTrace() ;
+    virtual void setStackTrace(const char* exceptionClass) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*BrokerError_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/BrokerError.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,46 @@
+/*
+ * 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 "BrokerException.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+BrokerException::BrokerException(p<BrokerError> cause)
+   : OpenWireException("")  // TODO: Add trace
+{
+    string message ;
+
+    brokerError = cause ;
+
+    // Build exception message
+    message.assign("The operation failed: Type: ") ;
+    message.append( cause->getExceptionClass()->c_str() ) ;
+    message.append(" stack: ") ;
+    message.append( cause->getStackTrace()->c_str() ) ;
+}
+
+BrokerException::~BrokerException()
+{
+    // no-op
+}
+
+p<BrokerError> BrokerException::getCause()
+{
+    return brokerError ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/BrokerException.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,54 @@
+/*
+ * 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 BrokerException_hpp_
+#define BrokerException_hpp_
+
+#include <string>
+#include "BrokerError.hpp"
+#include "OpenWireException.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace std;
+      using namespace ifr ;
+
+/*
+ * 
+ */
+class BrokerException : public OpenWireException
+{
+private:
+    p<BrokerError> brokerError ;
+    
+public:
+    BrokerException(p<BrokerError> cause) ;
+    virtual ~BrokerException() ;
+
+    virtual p<BrokerError> getCause() ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*BrokerException_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/BrokerException.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/Connection.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/Connection.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/Connection.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/Connection.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,202 @@
+/*
+ * 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 "Connection.hpp"
+
+using namespace apache::activemq::client;
+
+
+// --- Constructors -------------------------------------------------
+
+/*
+ *
+ */
+Connection::Connection(p<ITransport> transport, p<ConnectionInfo> connectionInfo)
+{
+    this->transport      = transport ;
+    this->connectionInfo = connectionInfo ;
+    this->connected      = false ;
+    this->transacted     = false ;
+    this->closed         = false ;
+}
+
+/*
+ *
+ */
+Connection::~Connection()
+{
+}
+
+
+// --- Attribute methods --------------------------------------------
+
+/*
+ *
+ */
+p<ITransport> Connection::getTransport()
+{
+    return transport ;
+}
+
+/*
+ *
+ */
+void Connection::setTransport(p<ITransport> transport) throw(OpenWireException) 
+{
+    this->transport = transport ;
+}
+
+/*
+ *
+ */
+p<string> Connection::getClientId()
+{
+    return connectionInfo->getClientId() ;
+}
+
+/*
+ *
+ */
+void Connection::setClientId(const char* value)
+{
+    if( connected )
+        throw OpenWireException("You cannot change the ClientId once a connection is established") ; 
+
+    connectionInfo->setClientId( value ) ;
+}
+
+/*
+ *
+ */
+bool Connection::getTransacted()
+{
+    return transacted ;
+}
+
+/*
+ *
+ */
+void Connection::setTransacted(bool tx)
+{
+    transacted = tx ;
+}
+
+/*
+ *
+ */
+AcknowledgementMode Connection::getAcknowledgementMode()
+{
+    return acknowledgementMode ;
+}
+
+/*
+ *
+ */
+void Connection::setAcknowledgementMode(AcknowledgementMode mode)
+{
+    acknowledgementMode = mode ;
+}
+
+
+// --- Operation methods --------------------------------------------
+
+/*
+ *
+ */
+p<ISession> Connection::createSession() throw(OpenWireException)
+{
+    return createSession(transacted, acknowledgementMode) ;
+}
+
+/*
+ *
+ */
+p<ISession> Connection::createSession(bool transacted, AcknowledgementMode mode) throw(OpenWireException)
+{
+    checkConnected() ;
+
+    p<SessionInfo> sessionInfo = createSessionInfo(transacted, acknowledgementMode) ;
+
+    // Send session info to broker
+    syncRequest(sessionInfo) ;
+
+    p<ISession> session = new Session(this, sessionInfo) ;
+    sessions.push_back(session) ;
+
+    return session ;
+}
+
+/*
+ *
+ */
+p<Response> Connection::syncRequest(p<ICommand> command) throw(OpenWireException) 
+{
+    checkConnected() ;
+    
+    p<Response> response = transport->request(command) ;
+
+    if( response->getCommandType() == ExceptionResponse::TYPE )
+    {
+        p<ExceptionResponse> exceptionResponse = (p<ExceptionResponse>&)response ;
+        p<BrokerError>       brokerError = exceptionResponse->getException() ;
+        string               message ;
+
+        // Build error message
+        message.assign("Request failed: ") ;
+        message.append( brokerError->getExceptionClass()->c_str() ) ;
+        message.append(", ") ;
+        message.append( brokerError->getStackTrace()->c_str() ) ;
+
+        throw new OpenWireException( message.c_str() ) ; 
+    }
+    return response ;
+}
+
+
+// --- Implementation methods ---------------------------------------
+
+/*
+ *
+ */
+p<SessionInfo> Connection::createSessionInfo(bool transacted, AcknowledgementMode acknowledgementMode)
+{
+    p<SessionInfo> sessionInfo = new SessionInfo() ;
+    p<SessionId>   sessionId   = new SessionId() ;
+    
+    sessionId->setConnectionId ( connectionInfo->getConnectionId()->getValue()->c_str() ) ;
+
+    mutex.lock() ;
+    sessionId->setValue( ++sessionCounter ) ; 
+    mutex.unlock() ;
+
+    sessionInfo->setSessionId( sessionId ) ;
+    return sessionInfo ; 
+}
+
+/*
+ *
+ */
+void Connection::checkConnected() throw(OpenWireException) 
+{
+    if( closed )
+        throw new ConnectionClosedException("Oops! Connection already closed.") ;
+
+    if( !connected )
+    {
+        syncRequest((p<ICommand>&)connectionInfo) ;
+        connected = true ;
+    } 
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/Connection.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/Connection.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/Connection.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/Connection.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/Connection.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef Connection_hpp_
+#define Connection_hpp_
+
+#include <list>
+#include <string>
+
+#include "ISession.hpp"
+#include "IConnection.hpp"
+#include "Session.hpp"
+#include "OpenWireException.hpp"
+#include "ConnectionClosedException.hpp"
+#include "command/ExceptionResponse.hpp"
+#include "command/ConnectionInfo.hpp"
+#include "command/SessionInfo.hpp"
+#include "command/SessionId.hpp"
+#include "transport/ITransport.hpp"
+#include "util/SimpleMutex.hpp"
+#include "util/ifr/p"
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace std;
+      using namespace ifr;
+      using namespace apache::activemq::client::command;
+      using namespace apache::activemq::client::transport;
+      using namespace apache::activemq::client::util;
+
+/*
+ * 
+ */
+class Connection : public IConnection
+{
+private:
+    p<ConnectionInfo>   connectionInfo ;
+    p<ITransport>       transport ;
+    list< p<ISession> > sessions ;
+    bool                transacted,
+                        connected,
+                        closed ;
+    AcknowledgementMode acknowledgementMode ;
+    long                sessionCounter ;
+    SimpleMutex         mutex ;
+
+public:
+    // Constructors
+    Connection(p<ITransport> transport, p<ConnectionInfo> connectionInfo) ;
+    ~Connection() ;
+
+    // Attribute methods
+    virtual AcknowledgementMode getAcknowledgementMode() ;
+    virtual void setAcknowledgementMode(AcknowledgementMode mode) ;
+    virtual p<string> getClientId() ;
+    virtual void setClientId(const char* value) ;
+    virtual bool getTransacted() ;
+    virtual void setTransacted(bool tx) ;
+    virtual p<ITransport> getTransport() ;
+    virtual void setTransport(p<ITransport> transport) throw(OpenWireException) ;
+
+    // Operation methods
+    virtual p<ISession> createSession() throw(OpenWireException) ;
+    virtual p<ISession> createSession(bool transacted, AcknowledgementMode mode) throw(OpenWireException) ;
+    virtual p<Response> syncRequest(p<ICommand> command) throw(OpenWireException) ;
+
+protected:
+    // Implementation methods
+    p<SessionInfo> createSessionInfo(bool transacted, AcknowledgementMode mode) ;
+    void checkConnected() throw(OpenWireException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*Connection_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/Connection.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 "ConnectionClosedException.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+ConnectionClosedException::ConnectionClosedException(const char* message)
+    : OpenWireException(message)
+{
+    // no-op
+}
+
+ConnectionClosedException::~ConnectionClosedException()
+{
+    // no-op
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,44 @@
+/*
+ * 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 ConnectionClosedException_hpp_
+#define ConnectionClosedException_hpp_
+
+#include "OpenWireException.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+
+/*
+ * 
+ */
+class ConnectionClosedException : public OpenWireException
+{
+public:
+    ConnectionClosedException(const char* message) ;
+    virtual ~ConnectionClosedException() ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ConnectionClosedException_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConnectionClosedException.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,201 @@
+/*
+ * 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 "ConnectionFactory.hpp"
+#include "Connection.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ *
+ */
+ConnectionFactory::ConnectionFactory()
+{
+    host = new string() ;
+    host->assign("localhost") ;
+    port = 61616 ;
+    username = new string() ;
+    password = new string() ;
+    clientId = new string() ;
+}
+
+/*
+ *
+ */
+ConnectionFactory::ConnectionFactory(const char* host, int port)
+{
+    this->host = new string() ;
+    this->host->assign(host) ;
+    this->port = port ;
+    username = new string() ;
+    password = new string() ;
+    clientId = new string() ;
+}
+
+/*
+ *
+ */
+ConnectionFactory::~ConnectionFactory()
+{
+}
+
+
+// --- Attribute methods --------------------------------------------
+
+/*
+ *
+ */
+p<string> ConnectionFactory::getHost()
+{
+    return host ;
+}
+
+/*
+ *
+ */
+void ConnectionFactory::setHost(const char* host)
+{
+    this->host->assign(host) ;
+}
+
+/*
+ *
+ */
+int ConnectionFactory::getPort()
+{
+    return port ;
+}
+
+/*
+ *
+ */
+void ConnectionFactory::setPort(int port)
+{
+    port = port ;
+}
+
+/*
+ *
+ */
+p<string> ConnectionFactory::getUsername()
+{
+    return username ;
+}
+
+/*
+ *
+ */
+void ConnectionFactory::setUsername(const char* username)
+{
+    this->username->assign(username) ;
+}
+
+/*
+ *
+ */
+p<string> ConnectionFactory::getPassword()
+{
+    return password ;
+}
+
+/*
+ *
+ */
+void ConnectionFactory::setPassword(const char* password)
+{
+    this->password->assign(password) ;
+}
+
+/*
+ *
+ */
+p<string> ConnectionFactory::getClientId()
+{
+    return clientId ;
+}
+
+/*
+ *
+ */
+void ConnectionFactory::setClientId(const char* clientId)
+{
+    this->clientId->assign(clientId) ;
+}
+
+
+// --- Operation methods --------------------------------------------
+
+/*
+ *
+ */
+p<IConnection> ConnectionFactory::createConnection()
+{
+    return createConnection(username->c_str(), password->c_str()) ;
+}
+
+/*
+ *
+ */
+p<IConnection> ConnectionFactory::createConnection(const char* username, const char* password)
+{
+    p<ConnectionInfo> connectionInfo ;
+    p<ITransport>     transport ;
+    p<Connection>     connection ;
+
+    // Set up a new connection object
+    connectionInfo = createConnectionInfo(username, password) ;
+    transport      = createTransport() ;
+    connection     = new Connection(transport, connectionInfo) ;
+    connection->setClientId( clientId->c_str() ) ;
+
+    return connection ;
+}
+
+
+// --- Implementation methods ---------------------------------------
+
+/*
+ *
+ */
+p<ConnectionInfo> ConnectionFactory::createConnectionInfo(const char* username, const char* password)
+{
+    p<ConnectionInfo> connectionInfo = new ConnectionInfo() ;
+    p<ConnectionId>   connectionId   = new ConnectionId() ;
+
+    connectionId->setValue( createNewConnectionId()->c_str() ) ;
+    connectionInfo->setConnectionId( connectionId ) ;
+    connectionInfo->setUsername( username ) ;
+    connectionInfo->setPassword( password ) ;
+
+    return connectionInfo ;
+}
+
+/*
+ *
+ */
+p<string> ConnectionFactory::createNewConnectionId()
+{
+    return Guid::getGuidString() ; 
+}
+
+/*
+ *
+ */
+p<ITransport> ConnectionFactory::createTransport()
+{
+    p<ITransport> transport = new SocketTransport(host->c_str(), port) ;
+    return transport ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +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 ConnectionFactory_hpp_
+#define ConnectionFactory_hpp_
+
+// Must be included before any STL includes
+#include "util/Guid.hpp"
+
+#include <string>
+#include "IConnection.hpp"
+#include "IConnectionFactory.hpp"
+#include "command/ConnectionInfo.hpp"
+#include "command/ConnectionId.hpp"
+#include "transport/ITransport.hpp"
+#include "transport/SocketTransport.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+        using namespace apache::activemq::client::command;
+        using namespace apache::activemq::client::transport;
+        using namespace apache::activemq::client::util;
+        using namespace ifr;
+
+/*
+ * 
+ */
+class ConnectionFactory : IConnectionFactory
+{
+private:
+    p<string> host,
+              username,
+              password,
+              clientId ;
+    int       port ;
+
+public:
+    // Constructors
+    ConnectionFactory() ;
+    ConnectionFactory(const char* host, int port) ;
+    virtual ~ConnectionFactory() ;
+
+    // Attribute methods
+    virtual p<string> getHost() ;
+    virtual void setHost(const char* host) ;
+    virtual int getPort() ;
+    virtual void setPort(int port) ;
+    virtual p<string> getUsername() ;
+    virtual void setUsername(const char* username) ;
+    virtual p<string> getPassword() ;
+    virtual void setPassword(const char* password) ;
+    virtual p<string> getClientId() ;
+    virtual void setClientId(const char* clientId) ;
+
+    // Operation methods
+    virtual p<IConnection> createConnection() ;
+    virtual p<IConnection> createConnection(const char* username, const char* password) ;
+
+protected:
+    // Implementation methods
+    virtual p<ConnectionInfo> createConnectionInfo(const char* username, const char* password) ;
+    virtual p<string> createNewConnectionId() ;
+    virtual p<ITransport> createTransport() ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ConnectionFactory_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConnectionFactory.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 "ConsumerClosedException.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+ConsumerClosedException::ConsumerClosedException(const char* message)
+    : OpenWireException(message)
+{
+    // no-op
+}
+
+ConsumerClosedException::~ConsumerClosedException()
+{
+    // no-op
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,44 @@
+/*
+ * 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 ConsumerClosedException_hpp_
+#define ConsumerClosedException_hpp_
+
+#include "OpenWireException.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+
+/*
+ * 
+ */
+class ConsumerClosedException : public OpenWireException
+{
+public:
+    ConsumerClosedException(const char* message) ;
+    ~ConsumerClosedException() ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ConsumerClosedException_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ConsumerClosedException.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,41 @@
+/*
+ * 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 "DestinationFilter.hpp"
+
+using namespace apache::activemq::client;
+
+// Init static constants
+const char* DestinationFilter::ANY_DESCENDENT = ">" ;
+const char* DestinationFilter::ANY_CHILD      = "*" ;
+
+/*
+ * 
+ */
+DestinationFilter::DestinationFilter()
+{
+
+}
+
+DestinationFilter::~DestinationFilter()
+{
+    // no-op
+}
+
+bool DestinationFilter::matches(p<ActiveMQMessage> message)
+{
+    return matches( message->getDestination() ) ; 
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef DestinationFilter_hpp_
+#define DestinationFilter_hpp_
+
+#include "command/ActiveMQMessage.hpp"
+#include "command/ActiveMQDestination.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+      using namespace apache::activemq::client::command;
+
+/*
+ * 
+ */
+class DestinationFilter
+{
+public:
+    const static char* ANY_DESCENDENT ;
+    const static char* ANY_CHILD ;
+
+public:
+    DestinationFilter() ;
+    virtual ~DestinationFilter() ;
+
+    virtual bool matches(p<ActiveMQMessage> message) ;
+    virtual bool matches(p<ActiveMQDestination> destination) = 0 ;
+};
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*DestinationFilter_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/DestinationFilter.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,47 @@
+/*
+ * 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 "FutureResponse.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+FutureResponse::FutureResponse()
+{
+    complete = false ;
+    response = NULL ;
+}
+
+FutureResponse::~FutureResponse()
+{
+}
+
+p<Response> FutureResponse::getResponse()
+{
+    return response ;
+}
+
+void FutureResponse::setResponse(p<Response> response)
+{
+    response = response ;
+}
+
+bool FutureResponse::isCompleted()
+{
+    return complete ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/FutureResponse.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,58 @@
+/*
+ * 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 FutureResponse_hpp_
+#define FutureResponse_hpp_
+
+#include <string>
+#include "command/Response.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+      using namespace apache::activemq::client::command;
+
+/*
+ * Interface for commands.
+ */
+class FutureResponse
+{
+private:
+    p<Response> response ;
+    bool        complete ;
+
+public:
+    FutureResponse() ;
+    virtual ~FutureResponse() ;
+
+    virtual p<Response> getResponse() ;
+    virtual void setResponse(p<Response> response) ;
+    virtual bool isCompleted() ;
+
+    // TODO: add notify/wait
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*FutureResponse_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/FutureResponse.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,60 @@
+/*
+ * 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 IConnection_hpp_
+#define IConnection_hpp_
+
+#include "ISession.hpp"
+#include "OpenWireException.hpp"
+#include "util/ifr/p"
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+        using namespace ifr;
+
+enum AcknowledgementMode {
+    UnknownMode, AutoMode, ClientMode, TransactionalMode 
+} ;
+
+/*
+ * 
+ */
+struct IConnection
+{
+    virtual p<ISession> createSession() throw(OpenWireException) = 0 ;
+    virtual p<ISession> createSession(bool transacted, AcknowledgementMode ackMode) throw(OpenWireException) = 0 ;
+    virtual bool getTransacted() = 0 ;
+    virtual void setTransacted(bool tx) = 0 ;
+    virtual AcknowledgementMode getAcknowledgementMode() = 0 ;
+    virtual void setAcknowledgementMode(AcknowledgementMode mode) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IConnection_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IConnection.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,46 @@
+/*
+ * 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 IConnectionFactory_hpp_
+#define IConnectionFactory_hpp_
+
+#include <string>
+#include "IConnection.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+struct IConnectionFactory
+{
+    virtual p<IConnection> createConnection() = 0 ;
+    virtual p<IConnection> createConnection(const char* username, const char* password) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IConnectionFactory_hpp_*/

Propchange: incubator/activemq/trunk/openwire-cpp/src/IConnectionFactory.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,43 @@
+/*
+ * 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 IDestination_hpp_
+#define IDestination_hpp_
+
+#include "command/ICommand.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+        using namespace apache::activemq::client::command;
+
+/*
+ * 
+ */
+struct IDestination
+{
+    // Empty marker interface
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IDestination_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IDestination.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,45 @@
+/*
+ * 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 IMessage_hpp_
+#define IMessage_hpp_
+
+#include "IDestination.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+struct IMessage
+{
+    virtual p<IDestination> getFromDestination() = 0 ;
+    virtual void setFromDestination(p<IDestination> destination) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IMessage_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IMessage.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,46 @@
+/*
+ * 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 IMessageConsumer_hpp_
+#define IMessageConsumer_hpp_
+
+#include <string>
+#include "IMessage.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+struct IMessageConsumer
+{
+    virtual p<IMessage> receive() = 0 ;
+    virtual p<IMessage> receiveNoWait() = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IMessageConsumer_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IMessageConsumer.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,47 @@
+/*
+ * 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 IMessageProducer_hpp_
+#define IMessageProducer_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "IMessage.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+struct IMessageProducer
+{
+    virtual void send(p<IMessage> message) = 0 ;
+    virtual void send(p<IDestination> destination, p<IMessage> message) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IMessageProducer_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IMessageProducer.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,47 @@
+/*
+ * 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 IQueue_hpp_
+#define IQueue_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+      using namespace std;
+
+/*
+ * 
+ */
+struct IQueue : IDestination
+{
+    virtual p<string> getQueueName() = 0 ;
+    virtual void setQueueName(const char* name) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IQueue_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/IQueue.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ISession.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ISession.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ISession.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ISession.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,58 @@
+/*
+ * 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 ISession_hpp_
+#define ISession_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "IMessageProducer.hpp"
+#include "IMessageConsumer.hpp"
+#include "IQueue.hpp"
+#include "ITopic.hpp"
+#include "ITextMessage.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+struct ISession
+{
+    virtual p<IMessageProducer> createProducer() = 0 ;
+    virtual p<IMessageProducer> createProducer(p<IDestination> destination) = 0 ;
+    virtual p<IMessageConsumer> createConsumer(p<IDestination> destination) = 0 ;
+    virtual p<IMessageConsumer> createConsumer(p<IDestination> destination, const char* selector) = 0 ;
+    virtual p<IQueue> getQueue(const char* name) = 0 ;
+    virtual p<ITopic> getTopic(const char* name) = 0 ;
+    virtual p<IMessage> createMessage() = 0 ;
+    virtual p<ITextMessage> createTextMessage() = 0 ;
+    virtual p<ITextMessage> createTextMessage(const char* text) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ISession_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ISession.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,42 @@
+/*
+ * 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 ITemporaryQueue_hpp_
+#define ITemporaryQueue_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+
+/*
+ * 
+ */
+struct ITemporaryQueue : IDestination
+{
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ITemporaryQueue_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ITemporaryQueue.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,42 @@
+/*
+ * 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 ITemporaryTopic_hpp_
+#define ITemporaryTopic_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+
+/*
+ * 
+ */
+struct ITemporaryTopic : IDestination
+{
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ITemporaryTopic_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ITemporaryTopic.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,45 @@
+/*
+ * 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 ITextMessage_hpp_
+#define ITextMessage_hpp_
+
+#include <string>
+#include "IMessage.hpp"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+        using namespace std;
+
+/*
+ * 
+ */
+struct ITextMessage : IMessage
+{
+    virtual string* getText() = 0 ;
+    virtual void setText(string* txt) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ITextMessage_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ITextMessage.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,47 @@
+/*
+ * 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 ITopic_hpp_
+#define ITopic_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+      using namespace std;
+
+/*
+ * 
+ */
+struct ITopic : IDestination
+{
+    virtual p<string> getTopicName() = 0 ;
+    virtual void setTopicName(const char* name) = 0 ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*ITopic_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/ITopic.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,56 @@
+/*
+ * 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 "MessageConsumer.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+MessageConsumer::MessageConsumer(p<Session> session, p<ConsumerInfo> producerInfo)
+{
+    this->session      = session ;
+    this->consumerInfo = consumerInfo ;
+    this->closed       = false ;
+}
+
+MessageConsumer::~MessageConsumer()
+{
+    session->disposeOf( consumerInfo->getConsumerId() ) ;
+}
+
+p<IMessage> MessageConsumer::receive()
+{
+    checkClosed() ;
+    // TODO
+    return NULL ;
+}
+
+p<IMessage> MessageConsumer::receiveNoWait()
+{
+    checkClosed() ;
+    // TODO
+    return NULL ;
+}
+
+// Implementation methods ------------------------------------------------
+
+void MessageConsumer::checkClosed() throw(OpenWireException) 
+{
+    if( closed )
+        throw new ConnectionClosedException("Oops! Connection already closed") ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +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.
+ */
+#ifndef MessageConsumer_hpp_
+#define MessageConsume_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "IMessage.hpp"
+#include "IMessageConsumer.hpp"
+#include "Session.hpp"
+#include "OpenWireException.hpp"
+#include "ConnectionClosedException.hpp"
+#include "command/ConsumerInfo.hpp"
+#include "util/ifr/p"
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+class MessageConsumer : public IMessageConsumer
+{
+private:
+    p<Session>      session ;
+    p<ConsumerInfo> consumerInfo ;
+    bool            closed ;
+
+public:
+    MessageConsumer(p<Session> session, p<ConsumerInfo> consumerInfo) ;
+    ~MessageConsumer() ;
+
+    /* TODO
+    virtual void setMessageListener(p<IMessageListener> listener) ;
+    virtual p<IMessageListener> getMessageListener() ;
+    */
+
+    virtual p<IMessage> receive() ;
+    virtual p<IMessage> receiveNoWait() ;
+
+protected:
+    void checkClosed() throw(OpenWireException) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IMessageConsumer_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/MessageConsumer.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,43 @@
+/*
+ * 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 "MessageProducer.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+MessageProducer::MessageProducer(p<Session> session, p<ProducerInfo> producerInfo)
+{
+    this->session      = session ;
+    this->producerInfo = producerInfo ;
+}
+
+MessageProducer::~MessageProducer()
+{
+    session->disposeOf( producerInfo->getProducerId() ) ;
+}
+
+void MessageProducer::send(p<IMessage> message)
+{
+    send(producerInfo->getDestination(), message) ;
+}
+
+void MessageProducer::send(p<IDestination> destination, p<IMessage> message)
+{
+    session->doSend(destination, message) ;
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/MessageProducer.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,58 @@
+/*
+ * 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 MessageProducer_hpp_
+#define MessageProducer_hpp_
+
+#include <string>
+#include "IDestination.hpp"
+#include "IMessage.hpp"
+#include "IMessageProducer.hpp"
+#include "Session.hpp"
+#include "command/ProducerInfo.hpp"
+#include "util/ifr/p"
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+      using namespace ifr;
+
+/*
+ * 
+ */
+class MessageProducer : public IMessageProducer
+{
+private:
+    p<Session>      session ;
+    p<ProducerInfo> producerInfo ;
+
+public:
+    MessageProducer(p<Session> session, p<ProducerInfo> producerInfo) ;
+    ~MessageProducer() ;
+
+    virtual void send(p<IMessage> message) ;
+    virtual void send(p<IDestination> destination, p<IMessage> message) ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*IMessageProducer_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/MessageProducer.hpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,33 @@
+/*
+ * 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 "OpenWireException.hpp"
+
+using namespace apache::activemq::client;
+
+/*
+ * 
+ */
+OpenWireException::OpenWireException(const char* message)
+    : exception(message) 
+{
+    // no-op
+}
+
+OpenWireException::~OpenWireException()
+{
+    // no-op
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/OpenWireException.cpp
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp?rev=377433&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp Mon Feb 13 09:43:48 2006
@@ -0,0 +1,44 @@
+/*
+ * 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 OpenWireException_hpp_
+#define OpenWireException_hpp_
+
+#include <exception>
+
+namespace apache
+{
+  namespace activemq
+  {
+    namespace client
+    {
+
+/*
+ * 
+ */
+class OpenWireException : public exception
+{
+public:
+    OpenWireException(const char* message) ;
+    ~OpenWireException() ;
+} ;
+
+/* namespace */
+    }
+  }
+}
+
+#endif /*OpenWireException_hpp_*/
\ No newline at end of file

Propchange: incubator/activemq/trunk/openwire-cpp/src/OpenWireException.hpp
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message