diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-02-04 19:38:55 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2010-02-04 19:38:55 +0000 |
| commit | f98a59dd32d571096e1d10299d9d8434189d035b (patch) | |
| tree | 2778aae7310a0c1ebefe8efd835a96e795536b3e /qpid/python/qmf2/common.py | |
| parent | 3a7f44a61ce4cada2bfce431e405652744368ab3 (diff) | |
| download | qpid-python-f98a59dd32d571096e1d10299d9d8434189d035b.tar.gz | |
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
Diffstat (limited to 'qpid/python/qmf2/common.py')
| -rw-r--r-- | qpid/python/qmf2/common.py | 22 |
1 files changed, 22 insertions, 0 deletions
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) |
