summaryrefslogtreecommitdiff
path: root/qpid/java
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
commit505150f4ff07c7714411dd5b2160e32c643833b6 (patch)
tree7951b2bbab3be5d6b5d4af316806423f7388101d /qpid/java
parent4799ebee4cfc6d80dd06b4ac184ed1f3dd42a633 (diff)
downloadqpid-python-505150f4ff07c7714411dd5b2160e32c643833b6.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@636791 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java b/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
index 001ad7220c..21c7b8c16b 100644
--- a/qpid/java/common/src/main/java/org/apache/qpidity/transport/ConnectionDelegate.java
+++ b/qpid/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/qpid/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java b/qpid/java/common/src/main/java/org/apache/qpidity/transport/TransportConstants.java
new file mode 100644
index 0000000000..47f7f17578
--- /dev/null
+++ b/qpid/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;
+}