summaryrefslogtreecommitdiff
path: root/python/qpid/messaging/constants.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2010-03-11 00:03:25 +0000
committerRafael H. Schloming <rhs@apache.org>2010-03-11 00:03:25 +0000
commit88086e0099c0fb67ac3a01c5f8793c0634b946a0 (patch)
tree7fab04466df2bb9e33e9e83ccc3286a420f0ee0d /python/qpid/messaging/constants.py
parent195193dab20a2e7481e470ddc8226cff9102e1fb (diff)
downloadqpid-python-88086e0099c0fb67ac3a01c5f8793c0634b946a0.tar.gz
added support for reject/release
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@921638 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/messaging/constants.py')
-rw-r--r--python/qpid/messaging/constants.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/qpid/messaging/constants.py b/python/qpid/messaging/constants.py
index cad47bd52a..f230c4def8 100644
--- a/python/qpid/messaging/constants.py
+++ b/python/qpid/messaging/constants.py
@@ -17,11 +17,16 @@
# under the License.
#
+__SELF__ = object()
+
class Constant:
- def __init__(self, name, value=None):
+ def __init__(self, name, value=__SELF__):
self.name = name
- self.value = value
+ if value is __SELF__:
+ self.value = self
+ else:
+ self.value = value
def __repr__(self):
return self.name
@@ -30,3 +35,6 @@ AMQP_PORT = 5672
AMQPS_PORT = 5671
UNLIMITED = Constant("UNLIMITED", 0xFFFFFFFFL)
+
+REJECTED = Constant("REJECTED")
+RELEASED = Constant("RELEASED")