summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2008-03-13 16:04:46 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2008-03-13 16:04:46 +0000
commit1c1efeddef24ef18d75af65e4249b541b1382ea8 (patch)
tree68e0493718379c9051a14aac1ffe356b8b987aa6
parentf7b41c279c7d26eb572b07bb089f2d1f8003a2c8 (diff)
downloadqpid-python-1c1efeddef24ef18d75af65e4249b541b1382ea8.tar.gz
Added constant to represent the AMQP versions, as previously it was hard-coded.
Modified the ConnectionDelegate to use the Constants for AMQP version. Also the version cosntants were changed to 99-0 to work with the c++ broker until the 0-10 framing gets completed. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@636791 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java2
-rw-r--r--java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java b/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
index 001ad7220c..21c7b8c16b 100644
--- a/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
+++ b/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
@@ -83,7 +83,7 @@ public abstract class ConnectionDelegate extends MethodDelegate<Channel>
if (hdr.getMajor() != 0 && hdr.getMinor() != 10)
{
// XXX
- ch.getConnection().send(new ConnectionEvent(0, new ProtocolHeader(1, 0, 10)));
+ ch.getConnection().send(new ConnectionEvent(0, new ProtocolHeader(1, TransportConstants.CONNECTION_VERSION_MAJOR, TransportConstants.CONNECTION_VERSION_MINOR)));
ch.getConnection().close();
}
else
diff --git a/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java b/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java
new file mode 100644
index 0000000000..47f7f17578
--- /dev/null
+++ b/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java
@@ -0,0 +1,7 @@
+package org.apache.qpidity.transport;
+
+public class TransportConstants
+{
+ public static final byte CONNECTION_VERSION_MAJOR = 99;
+ public static final byte CONNECTION_VERSION_MINOR = 0;
+}