summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-02-19 13:21:15 +0000
committerRafael H. Schloming <rhs@apache.org>2010-02-19 13:21:15 +0000
commitd092307cc35adeb87a455f6ceb1166b7874c8194 (patch)
treece1c454d7fb0b8c6b7fc3f39a61b85e5e1d3a79f /qpid/python
parent388cd1423cbc77cb9bdbf875f1bf23403538e7cd (diff)
downloadqpid-python-d092307cc35adeb87a455f6ceb1166b7874c8194.tar.gz
moved Pattern into driver
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@911807 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/messaging/driver.py16
-rw-r--r--qpid/python/qpid/messaging/endpoints.py15
2 files changed, 15 insertions, 16 deletions
diff --git a/qpid/python/qpid/messaging/driver.py b/qpid/python/qpid/messaging/driver.py
index 9d58616804..a09686badd 100644
--- a/qpid/python/qpid/messaging/driver.py
+++ b/qpid/python/qpid/messaging/driver.py
@@ -28,7 +28,6 @@ from qpid.framing import OpEncoder, SegmentEncoder, FrameEncoder, \
FrameDecoder, SegmentDecoder, OpDecoder
from qpid.messaging import address
from qpid.messaging.constants import UNLIMITED
-from qpid.messaging.endpoints import Pattern
from qpid.messaging.exceptions import ConnectError
from qpid.messaging.message import get_codec, Message
from qpid.ops import *
@@ -64,6 +63,21 @@ DURABLE_DEFAULT=True
# XXX
+class Pattern:
+ """
+ The pattern filter matches the supplied wildcard pattern against a
+ message subject.
+ """
+
+ def __init__(self, value):
+ self.value = value
+
+ # XXX: this should become part of the driver
+ def _bind(self, sst, exchange, queue):
+ from qpid.ops import ExchangeBind
+ sst.write_cmd(ExchangeBind(exchange=exchange, queue=queue,
+ binding_key=self.value.replace("*", "#")))
+
FILTER_DEFAULTS = {
"topic": Pattern("*"),
"amq.failover": Pattern("DUMMY")
diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py
index 2337986ecb..596866de66 100644
--- a/qpid/python/qpid/messaging/endpoints.py
+++ b/qpid/python/qpid/messaging/endpoints.py
@@ -191,21 +191,6 @@ class Connection:
ssn.close()
self.disconnect()
-class Pattern:
- """
- The pattern filter matches the supplied wildcard pattern against a
- message subject.
- """
-
- def __init__(self, value):
- self.value = value
-
- # XXX: this should become part of the driver
- def _bind(self, sst, exchange, queue):
- from qpid.ops import ExchangeBind
- sst.write_cmd(ExchangeBind(exchange=exchange, queue=queue,
- binding_key=self.value.replace("*", "#")))
-
class Session:
"""