summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Reference.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-11-13 10:17:27 +0100
committerBenoit Foucher <benoit@zeroc.com>2012-11-13 10:17:27 +0100
commit99b44d083eeee5583adfe642081a827224fa1309 (patch)
tree46bb3af634cbd5d90b9e5d46099f4e0e85f70ec6 /java/src/IceInternal/Reference.java
parentCosmetic updates to IceGrid Admin connection wizard (diff)
downloadice-99b44d083eeee5583adfe642081a827224fa1309.tar.bz2
ice-99b44d083eeee5583adfe642081a827224fa1309.tar.xz
ice-99b44d083eeee5583adfe642081a827224fa1309.zip
Fixed ICE-4927: fixed proxy encoding to marshal protocol/encoding version instead of encoding it in endpoints
Diffstat (limited to 'java/src/IceInternal/Reference.java')
-rw-r--r--java/src/IceInternal/Reference.java35
1 files changed, 34 insertions, 1 deletions
diff --git a/java/src/IceInternal/Reference.java b/java/src/IceInternal/Reference.java
index 2e6e1f4af1a..b750743c252 100644
--- a/java/src/IceInternal/Reference.java
+++ b/java/src/IceInternal/Reference.java
@@ -36,6 +36,12 @@ public abstract class Reference implements Cloneable
return _secure;
}
+ public final Ice.ProtocolVersion
+ getProtocol()
+ {
+ return _protocol;
+ }
+
public final Ice.EncodingVersion
getEncoding()
{
@@ -155,7 +161,7 @@ public abstract class Reference implements Cloneable
return r;
}
- public final Reference
+ public Reference
changeEncoding(Ice.EncodingVersion newEncoding)
{
if(newEncoding.equals(_encoding))
@@ -212,6 +218,7 @@ public abstract class Reference implements Cloneable
{
h = IceInternal.HashUtil.hashAdd(h, _compress);
}
+ h = IceInternal.HashUtil.hashAdd(h, _protocol);
h = IceInternal.HashUtil.hashAdd(h, _encoding);
_hashValue = h;
@@ -254,6 +261,12 @@ public abstract class Reference implements Cloneable
s.writeBool(_secure);
+ if(!s.getWriteEncoding().equals(Ice.Util.Encoding_1_0))
+ {
+ _protocol.__write(s);
+ _encoding.__write(s);
+ }
+
// Derived class writes the remainder of the reference.
}
@@ -348,6 +361,18 @@ public abstract class Reference implements Cloneable
s.append(" -s");
}
+ if(!_protocol.equals(Ice.Util.Protocol_1_0))
+ {
+ s.append(" -p ");
+ s.append(Ice.Util.protocolVersionToString(_protocol));
+ }
+
+ if(!_encoding.equals(Ice.Util.Encoding_1_0))
+ {
+ s.append(" -e ");
+ s.append(Ice.Util.encodingVersionToString(_encoding));
+ }
+
return s.toString();
// Derived class writes the remainder of the string.
@@ -404,6 +429,11 @@ public abstract class Reference implements Cloneable
return false;
}
+ if(!_protocol.equals(r._protocol))
+ {
+ return false;
+ }
+
if(!_encoding.equals(r._encoding))
{
return false;
@@ -440,6 +470,7 @@ public abstract class Reference implements Cloneable
private Ice.Identity _identity;
private java.util.Map<String, String> _context;
private String _facet;
+ private Ice.ProtocolVersion _protocol;
private Ice.EncodingVersion _encoding;
protected boolean _overrideCompress;
protected boolean _compress; // Only used if _overrideCompress == true
@@ -451,6 +482,7 @@ public abstract class Reference implements Cloneable
String facet,
int mode,
boolean secure,
+ Ice.ProtocolVersion protocol,
Ice.EncodingVersion encoding)
{
//
@@ -467,6 +499,7 @@ public abstract class Reference implements Cloneable
_identity = identity;
_context = _emptyContext;
_facet = facet;
+ _protocol = protocol;
_encoding = encoding;
_hashInitialized = false;
_overrideCompress = false;