Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

qpid/messaging/Connection.h

Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_CONNECTION_H
00002 #define QPID_MESSAGING_CONNECTION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/Handle.h"
00027 #include "qpid/messaging/exceptions.h"
00028 #include "qpid/types/Variant.h"
00029 
00030 #include <string>
00031 
00032 namespace qpid {
00033 namespace messaging {
00034 
00035 template <class> class PrivateImplRef;
00036 class ConnectionImpl;
00037 class Session;
00038 
00043 class Connection : public qpid::messaging::Handle<ConnectionImpl>
00044 {
00045   public:
00046     QPID_MESSAGING_EXTERN Connection(ConnectionImpl* impl);
00047     QPID_MESSAGING_EXTERN Connection(const Connection&);
00048     QPID_MESSAGING_EXTERN Connection();
00078     QPID_MESSAGING_EXTERN Connection(const std::string& url, const qpid::types::Variant::Map& options = qpid::types::Variant::Map());
00085     QPID_MESSAGING_EXTERN Connection(const std::string& url, const std::string& options);
00086     QPID_MESSAGING_EXTERN ~Connection();
00087     QPID_MESSAGING_EXTERN Connection& operator=(const Connection&);
00088     QPID_MESSAGING_EXTERN void setOption(const std::string& name, const qpid::types::Variant& value);
00089     QPID_MESSAGING_EXTERN void open();
00090     QPID_MESSAGING_EXTERN bool isOpen();
00096     QPID_MESSAGING_EXTERN void close();
00097     QPID_MESSAGING_EXTERN Session createTransactionalSession(const std::string& name = std::string());
00098     QPID_MESSAGING_EXTERN Session createSession(const std::string& name = std::string());
00099 
00100     QPID_MESSAGING_EXTERN Session getSession(const std::string& name) const;
00101     QPID_MESSAGING_EXTERN std::string getAuthenticatedUsername();
00102   private:
00103   friend class qpid::messaging::PrivateImplRef<Connection>;
00104 
00105 };
00106 
00107 }} // namespace qpid::messaging
00108 
00109 #endif  

Qpid C++ API Reference
Generated on Fri Feb 18 12:26:54 2011 for Qpid C++ Client API by doxygen 1.4.7