summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/ConsoleSessionImpl.h
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-09-13 19:34:38 +0000
committerTed Ross <tross@apache.org>2011-09-13 19:34:38 +0000
commit5b4907d81effd26d15dd418ff2a3df8bb3dab9e3 (patch)
treeb94ebca24ca0c8217ac60769ca73c27a694edee9 /qpid/cpp/src/qmf/ConsoleSessionImpl.h
parent7666ee8f50ba9554e71142290fcc58c2e1ad46e9 (diff)
downloadqpid-python-5b4907d81effd26d15dd418ff2a3df8bb3dab9e3.tar.gz
QPID-3484 - QMF Main-Loop Integration
Applied patch from Darryl Pierce. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1170314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/ConsoleSessionImpl.h')
-rw-r--r--qpid/cpp/src/qmf/ConsoleSessionImpl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/qpid/cpp/src/qmf/ConsoleSessionImpl.h b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
index 478d24e56b..660fc9b83f 100644
--- a/qpid/cpp/src/qmf/ConsoleSessionImpl.h
+++ b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
@@ -27,6 +27,7 @@
#include "qmf/SchemaId.h"
#include "qmf/Schema.h"
#include "qmf/ConsoleEventImpl.h"
+#include "qmf/EventNotifierImpl.h"
#include "qmf/SchemaCache.h"
#include "qmf/Query.h"
#include "qpid/sys/Mutex.h"
@@ -41,9 +42,14 @@
#include "qpid/messaging/Address.h"
#include "qpid/management/Buffer.h"
#include "qpid/types/Variant.h"
+
+#include <boost/shared_ptr.hpp>
#include <map>
#include <queue>
+using namespace boost;
+using namespace std;
+
namespace qmf {
class ConsoleSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
public:
@@ -59,6 +65,10 @@ namespace qmf {
void close();
bool nextEvent(ConsoleEvent& e, qpid::messaging::Duration t);
int pendingEvents() const;
+
+ void setEventNotifier(EventNotifierImpl* notifier);
+ EventNotifierImpl* getEventNotifier() const;
+
uint32_t getAgentCount() const;
Agent getAgent(uint32_t i) const;
Agent getConnectedBrokerAgent() const { return connectedBrokerAgent; }
@@ -80,6 +90,7 @@ namespace qmf {
Query agentQuery;
bool opened;
std::queue<ConsoleEvent> eventQueue;
+ EventNotifierImpl* eventNotifier;
qpid::sys::Thread* thread;
bool threadCanceled;
uint64_t lastVisit;
@@ -102,11 +113,17 @@ namespace qmf {
void handleAgentUpdate(const std::string&, const qpid::types::Variant::Map&, const qpid::messaging::Message&);
void handleV1SchemaResponse(qpid::management::Buffer&, uint32_t, const qpid::messaging::Message&);
void periodicProcessing(uint64_t);
+ void alertEventNotifierLH(bool readable);
void run();
uint32_t correlator() { qpid::sys::Mutex::ScopedLock l(corrlock); return nextCorrelator++; }
friend class AgentImpl;
};
+
+ struct ConsoleSessionImplAccess {
+ static ConsoleSessionImpl& get(ConsoleSession& session);
+ static const ConsoleSessionImpl& get(const ConsoleSession& session);
+ };
}
#endif