From f98a59dd32d571096e1d10299d9d8434189d035b Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Thu, 4 Feb 2010 19:38:55 +0000 Subject: QPID-2261: add multi-msg query response support. Fix mailbox code to allow mult-msg per correlation id. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@906615 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qmf2/common.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'qpid/python/qmf2/common.py') diff --git a/qpid/python/qmf2/common.py b/qpid/python/qmf2/common.py index 280cee3576..66cb1f3a7d 100644 --- a/qpid/python/qmf2/common.py +++ b/qpid/python/qmf2/common.py @@ -969,6 +969,28 @@ class QmfQuery(_mapEncoder): return cls(_target=target, _target_params=_target_params) create_wildcard = classmethod(_create_wildcard) + def _create_wildcard_object_id(cls, schema_id): + """ + Create a wildcard to match all object_ids for a given schema. + """ + if not isinstance(schema_id, SchemaClassId): + raise TypeError("class SchemaClassId expected") + params = {QmfData.KEY_SCHEMA_ID: schema_id} + return cls(_target=QmfQuery.TARGET_OBJECT_ID, + _target_params=params) + create_wildcard_object_id = classmethod(_create_wildcard_object_id) + + def _create_wildcard_object(cls, schema_id): + """ + Create a wildcard to match all objects for a given schema. + """ + if not isinstance(schema_id, SchemaClassId): + raise TypeError("class SchemaClassId expected") + params = {QmfData.KEY_SCHEMA_ID: schema_id} + return cls(_target=QmfQuery.TARGET_OBJECT, + _target_params=params) + create_wildcard_object = classmethod(_create_wildcard_object) + def _create_predicate(cls, target, predicate, _target_params=None): return cls(_target=target, _target_params=_target_params, _predicate=predicate) -- cgit v1.2.1