You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2010/02/19 14:21:15 UTC
svn commit: r911807 - in /qpid/trunk/qpid/python/qpid/messaging: driver.py
endpoints.py
Author: rhs
Date: Fri Feb 19 13:21:15 2010
New Revision: 911807
URL: http://svn.apache.org/viewvc?rev=911807&view=rev
Log:
moved Pattern into driver
Modified:
qpid/trunk/qpid/python/qpid/messaging/driver.py
qpid/trunk/qpid/python/qpid/messaging/endpoints.py
Modified: qpid/trunk/qpid/python/qpid/messaging/driver.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/driver.py?rev=911807&r1=911806&r2=911807&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/driver.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/driver.py Fri Feb 19 13:21:15 2010
@@ -28,7 +28,6 @@
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 @@
# 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")
Modified: qpid/trunk/qpid/python/qpid/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/endpoints.py?rev=911807&r1=911806&r2=911807&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/endpoints.py Fri Feb 19 13:21:15 2010
@@ -191,21 +191,6 @@
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:
"""
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org