qmf/ConsoleSession.h Source File

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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 #include <qmf/ImportExport.h>
    00025 #include "qmf/Handle.h"
    00026 #include "qmf/Agent.h"
    00027 #include "qmf/Subscription.h"
    00028 #include "qpid/messaging/Duration.h"
    00029 #include "qpid/messaging/Connection.h"
    00030 #include <string>
    00031
    00032 namespace qmf {
    00033
    00034 #ifndef SWIG
    00035     template <class> class PrivateImplRef;
    00036 #endif
    00037
    00038     class ConsoleSessionImpl;
    00039     class ConsoleEvent;
    00040
    00041     class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
    00042     public:
    00043         QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0);
    00044         QMF_EXTERN ConsoleSession(const ConsoleSession&);
    00045         QMF_EXTERN ConsoleSession& operator=(const ConsoleSession&);
    00046         QMF_EXTERN ~ConsoleSession();
    00047
    00069         QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options="");
    00070
    00076         QMF_EXTERN void setDomain(const std::string& domain);
    00077         QMF_EXTERN void setAgentFilter(const std::string& filter);
    00078
    00082         QMF_EXTERN void open();
    00083
    00087         QMF_EXTERN void close();
    00088
    00095         QMF_EXTERN bool nextEvent(ConsoleEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER);
    00096
    00100         QMF_EXTERN int pendingEvents() const;
    00101
    00105         QMF_EXTERN uint32_t getAgentCount() const;
    00106         QMF_EXTERN Agent getAgent(uint32_t agentIndex) const;
    00107
    00111         QMF_EXTERN Agent getConnectedBrokerAgent() const;
    00112
    00120         QMF_EXTERN Subscription subscribe(const Query& query,       const std::string& agentFilter = "", const std::string& options = "");
    00121         QMF_EXTERN Subscription subscribe(const std::string& query, const std::string& agentFilter = "", const std::string& options = "");
    00122
    00123 #ifndef SWIG
    00124     private:
    00125         friend class qmf::PrivateImplRef<ConsoleSession>;
    00126         friend struct ConsoleSessionImplAccess;
    00127 #endif
    00128     };
    00129
    00130 }
    00131
    00132 #endif