Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ConsoleSession.h
Go to the documentation of this file.
00001 #ifndef QMF_CONSOLE_SESSION_H
00002 #define QMF_CONSOLE_SESSION_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #if !defined(QMF_USE_DEPRECATED_API) && !defined(qmf2_EXPORTS) && !defined(SWIG)
00025 #  error "The API defined in this file has been DEPRECATED and will be removed in the future."
00026 #  error "Define 'QMF_USE_DEPRECATED_API' to enable continued use of the API."
00027 #endif
00028 
00029 #include <qmf/ImportExport.h>
00030 #include "qmf/Handle.h"
00031 #include "qmf/Agent.h"
00032 #include "qmf/Subscription.h"
00033 #include "qpid/messaging/Duration.h"
00034 #include "qpid/messaging/Connection.h"
00035 #include <string>
00036 
00037 namespace qmf {
00038 
00039 #ifndef SWIG
00040     template <class> class PrivateImplRef;
00041 #endif
00042 
00043     class ConsoleSessionImpl;
00044     class ConsoleEvent;
00045 
00046     class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
00047     public:
00048         QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0);
00049         QMF_EXTERN ConsoleSession(const ConsoleSession&);
00050         QMF_EXTERN ConsoleSession& operator=(const ConsoleSession&);
00051         QMF_EXTERN ~ConsoleSession();
00052 
00074         QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options="");
00075 
00081         QMF_EXTERN void setDomain(const std::string& domain);
00082         QMF_EXTERN void setAgentFilter(const std::string& filter);
00083 
00087         QMF_EXTERN void open();
00088 
00092         QMF_EXTERN void close();
00093 
00100         QMF_EXTERN bool nextEvent(ConsoleEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER);
00101 
00105         QMF_EXTERN int pendingEvents() const;
00106 
00110         QMF_EXTERN uint32_t getAgentCount() const;
00111         QMF_EXTERN Agent getAgent(uint32_t agentIndex) const;
00112 
00116         QMF_EXTERN Agent getConnectedBrokerAgent() const;
00117 
00125         QMF_EXTERN Subscription subscribe(const Query& query,       const std::string& agentFilter = "", const std::string& options = "");
00126         QMF_EXTERN Subscription subscribe(const std::string& query, const std::string& agentFilter = "", const std::string& options = "");
00127 
00128 #ifndef SWIG
00129     private:
00130         friend class qmf::PrivateImplRef<ConsoleSession>;
00131         friend struct ConsoleSessionImplAccess;
00132 #endif
00133     };
00134 
00135 }
00136 
00137 #endif

Qpid C++ API Reference
Generated on Wed Dec 30 2015 for Qpid C++ Client API by doxygen 1.7.6.1