From 74b68e0be99c74b8f59ef97a3a9162d5a8dfe257 Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Fri, 23 Apr 2010 20:27:27 +0000 Subject: QPID-2546: implement event support for ruby wrapper. Python pending... git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@937506 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qmf/engine/BrokerProxyImpl.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'cpp/src/qmf/engine/BrokerProxyImpl.cpp') diff --git a/cpp/src/qmf/engine/BrokerProxyImpl.cpp b/cpp/src/qmf/engine/BrokerProxyImpl.cpp index 2d955b0c26..b99cb414dc 100644 --- a/cpp/src/qmf/engine/BrokerProxyImpl.cpp +++ b/cpp/src/qmf/engine/BrokerProxyImpl.cpp @@ -445,9 +445,19 @@ void BrokerProxyImpl::handleHeartbeatIndication(Buffer& inBuffer, uint32_t seq, QPID_LOG(trace, "RCVD HeartbeatIndication seq=" << seq << " agentBank=" << agentBank); } -void BrokerProxyImpl::handleEventIndication(Buffer& /*inBuffer*/, uint32_t /*seq*/) +void BrokerProxyImpl::handleEventIndication(Buffer& inBuffer, uint32_t seq) { - // TODO + auto_ptr classKey(SchemaClassKeyImpl::factory(inBuffer)); + const SchemaEventClass *schema = console.impl->getEventClass(classKey.get()); + if (schema == 0) { + QPID_LOG(trace, "No Schema Found for EventIndication. seq=" << seq << " key=" << classKey->impl->str()); + return; + } + + EventPtr eptr(EventImpl::factory(schema, inBuffer)); + + console.impl->eventEventReceived(eptr); + QPID_LOG(trace, "RCVD EventIndication seq=" << seq << " key=" << classKey->impl->str()); } void BrokerProxyImpl::handleSchemaResponse(Buffer& inBuffer, uint32_t seq) -- cgit v1.2.1