summaryrefslogtreecommitdiff
path: root/java/common/templates/model/ProtocolVersionListClass.vm
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
commita8c545bf696bc38284507b96e38c9f38d5b28fab (patch)
treec6264fbd4104af48ca3a123739f817373dc8e6b2 /java/common/templates/model/ProtocolVersionListClass.vm
parent3f1ddfdd9464e519b4f51a8421bf9569e1db26f2 (diff)
downloadqpid-python-a8c545bf696bc38284507b96e38c9f38d5b28fab.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/qpid@800363 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/common/templates/model/ProtocolVersionListClass.vm')
-rw-r--r--java/common/templates/model/ProtocolVersionListClass.vm7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/common/templates/model/ProtocolVersionListClass.vm b/java/common/templates/model/ProtocolVersionListClass.vm
index 9ac6adfdf5..d3e943e36f 100644
--- a/java/common/templates/model/ProtocolVersionListClass.vm
+++ b/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)
{