summaryrefslogtreecommitdiff
path: root/cpp/bindings/qmf/python
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2010-05-21 17:39:51 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2010-05-21 17:39:51 +0000
commita3462820c7f5af8bbb7300334c49d47b239fe901 (patch)
treea7b80c797d774f43130dd67e9c6e00ca7fee1ced /cpp/bindings/qmf/python
parentb8d8b5b3b620e63052f60524ebb54ef0be92c6d1 (diff)
downloadqpid-python-a3462820c7f5af8bbb7300334c49d47b239fe901.tar.gz
QMF: add bindEvent api to allow filtering of unsolicted events.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@947084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qmf/python')
-rw-r--r--cpp/bindings/qmf/python/qmf.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/cpp/bindings/qmf/python/qmf.py b/cpp/bindings/qmf/python/qmf.py
index 37442b94ea..06d3070841 100644
--- a/cpp/bindings/qmf/python/qmf.py
+++ b/cpp/bindings/qmf/python/qmf.py
@@ -1166,9 +1166,22 @@ class Console(Thread):
if "class" in kwargs:
self.impl.bindClass(package, kwargs["class"])
else:
- self.impl.bindClass(package)
+ self.impl.bindClass(package, "*")
else:
raise Exception("Argument error: invalid arguments, use 'key' or 'package'[,'class']")
+
+
+ def bind_event(self, kwargs = {}):
+ if "key" in kwargs:
+ self.impl.bindEvent(kwargs["key"])
+ elif "package" in kwargs:
+ package = kwargs["package"]
+ if "event" in kwargs:
+ self.impl.bindEvent(package, kwargs["event"])
+ else:
+ self.impl.bindEvent(package, "*")
+ else:
+ raise Exception("Argument error: invalid arguments, use 'key' or 'package'[,'event']")
def agents(self, broker=None):