summaryrefslogtreecommitdiff
path: root/qpid/java/common
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-08-03 13:24:29 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-08-03 13:24:29 +0000
commite72532f91ff54db52f3822897764625ee12344e1 (patch)
tree057489cc9f6aa093c92380a484e7ac7ede908f08 /qpid/java/common
parent30d0d257c7f9783f33c2cf4fa0709226be2cec45 (diff)
downloadqpid-python-e72532f91ff54db52f3822897764625ee12344e1.tar.gz
QPID-2002 : Change CON-1001 to make client ID optional so that the various stages of Open can be correctly logged.
Client ID is not initially provided so we would be unable to log the protocol negotiation without removing this Modified ProtocolVersion Template to include a toString value to make it easier to log. There are two templates to update one in gentools/templ.java and one in common/templates Exposed verification methods to allow systests to reuse the code git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@800363 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common')
-rw-r--r--qpid/java/common/templates/model/ProtocolVersionListClass.vm7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/java/common/templates/model/ProtocolVersionListClass.vm b/qpid/java/common/templates/model/ProtocolVersionListClass.vm
index 9ac6adfdf5..d3e943e36f 100644
--- a/qpid/java/common/templates/model/ProtocolVersionListClass.vm
+++ b/qpid/java/common/templates/model/ProtocolVersionListClass.vm
@@ -41,12 +41,14 @@ public class ProtocolVersion implements Comparable
{
private final byte _majorVersion;
private final byte _minorVersion;
+ private final String _stringFormat;
public ProtocolVersion(byte majorVersion, byte minorVersion)
{
_majorVersion = majorVersion;
_minorVersion = minorVersion;
+ _stringFormat = _majorVersion+"-"+_minorVersion;
}
public byte getMajorVersion()
@@ -59,6 +61,11 @@ public class ProtocolVersion implements Comparable
return _minorVersion;
}
+ public String toString()
+ {
+ return _stringFormat;
+ }
+
public int compareTo(Object o)
{