summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-04-30 11:57:21 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-04-30 11:57:21 +0200
commit06024a6fc1ceb70d70e41f93ba0016edefe36289 (patch)
tree40f4bdf32862e466d059bbf0dd1a7293aa522604 /java/src
parentWin32 fixes, C# port (diff)
downloadice-06024a6fc1ceb70d70e41f93ba0016edefe36289.tar.bz2
ice-06024a6fc1ceb70d70e41f93ba0016edefe36289.tar.xz
ice-06024a6fc1ceb70d70e41f93ba0016edefe36289.zip
Python port, added tests to Ice/info
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceInternal/EndpointI.java4
-rw-r--r--java/src/IceInternal/ProtocolPluginFacade.java5
-rw-r--r--java/src/IceInternal/ProtocolPluginFacadeI.java10
-rw-r--r--java/src/IceInternal/TcpEndpointI.java4
-rw-r--r--java/src/IceInternal/UdpEndpointI.java2
-rw-r--r--java/src/IceSSL/EndpointI.java2
-rw-r--r--java/src/IceSSL/Instance.java6
7 files changed, 31 insertions, 2 deletions
diff --git a/java/src/IceInternal/EndpointI.java b/java/src/IceInternal/EndpointI.java
index 2196d6b6684..0000be4a8fa 100644
--- a/java/src/IceInternal/EndpointI.java
+++ b/java/src/IceInternal/EndpointI.java
@@ -19,8 +19,8 @@ abstract public class EndpointI implements Ice.Endpoint, java.lang.Comparable<En
public EndpointI()
{
- _protocol = (Ice.ProtocolVersion)Protocol.currentProtocol.clone();
- _encoding = (Ice.EncodingVersion)Protocol.currentEncoding.clone();
+ _protocol = (Ice.ProtocolVersion)Protocol.currentProtocol;
+ _encoding = (Ice.EncodingVersion)Protocol.currentEncoding;
}
public String
diff --git a/java/src/IceInternal/ProtocolPluginFacade.java b/java/src/IceInternal/ProtocolPluginFacade.java
index b55b6a58824..717010b0312 100644
--- a/java/src/IceInternal/ProtocolPluginFacade.java
+++ b/java/src/IceInternal/ProtocolPluginFacade.java
@@ -28,6 +28,11 @@ public interface ProtocolPluginFacade
int getProtocolSupport();
//
+ // Get the default encoding to be used in endpoints.
+ //
+ Ice.EncodingVersion getDefaultEncoding();
+
+ //
// Get the default hostname to be used in endpoints.
//
String getDefaultHost();
diff --git a/java/src/IceInternal/ProtocolPluginFacadeI.java b/java/src/IceInternal/ProtocolPluginFacadeI.java
index 2d219c36818..ca10a4f412c 100644
--- a/java/src/IceInternal/ProtocolPluginFacadeI.java
+++ b/java/src/IceInternal/ProtocolPluginFacadeI.java
@@ -45,6 +45,16 @@ public class ProtocolPluginFacadeI implements ProtocolPluginFacade
{
return _instance.protocolSupport();
}
+
+ //
+ // Get the default encoding to be used in endpoints.
+ //
+ public Ice.EncodingVersion
+ getDefaultEncoding()
+ {
+ return _instance.defaultsAndOverrides().defaultEncoding;
+ }
+
//
// Get the default hostname to be used in endpoints.
//
diff --git a/java/src/IceInternal/TcpEndpointI.java b/java/src/IceInternal/TcpEndpointI.java
index 328c34a05b7..0d2ab229193 100644
--- a/java/src/IceInternal/TcpEndpointI.java
+++ b/java/src/IceInternal/TcpEndpointI.java
@@ -28,6 +28,7 @@ final class TcpEndpointI extends EndpointI
public
TcpEndpointI(Instance instance, String str, boolean oaEndpoint)
{
+ super(Protocol.currentProtocol, instance.defaultsAndOverrides().defaultEncoding);
_instance = instance;
_host = null;
_port = 0;
@@ -171,6 +172,7 @@ final class TcpEndpointI extends EndpointI
public
TcpEndpointI(BasicStream s)
{
+ super(new Ice.ProtocolVersion(), new Ice.EncodingVersion());
_instance = s.instance();
s.startReadEncaps();
_host = s.readString();
@@ -179,7 +181,9 @@ final class TcpEndpointI extends EndpointI
_compress = s.readBool();
if(!s.getReadEncoding().equals(Ice.Util.Encoding_1_0))
{
+ _protocol = new Ice.ProtocolVersion();
_protocol.__read(s);
+ _encoding = new Ice.EncodingVersion();
_encoding.__read(s);
}
else
diff --git a/java/src/IceInternal/UdpEndpointI.java b/java/src/IceInternal/UdpEndpointI.java
index aa675437c86..d3a8c23f27f 100644
--- a/java/src/IceInternal/UdpEndpointI.java
+++ b/java/src/IceInternal/UdpEndpointI.java
@@ -30,6 +30,7 @@ final class UdpEndpointI extends EndpointI
public
UdpEndpointI(Instance instance, String str, boolean oaEndpoint)
{
+ super(Protocol.currentProtocol, instance.defaultsAndOverrides().defaultEncoding);
_instance = instance;
_host = null;
_port = 0;
@@ -187,6 +188,7 @@ final class UdpEndpointI extends EndpointI
public
UdpEndpointI(BasicStream s)
{
+ super(new Ice.ProtocolVersion(), new Ice.EncodingVersion());
_instance = s.instance();
s.startReadEncaps();
_host = s.readString();
diff --git a/java/src/IceSSL/EndpointI.java b/java/src/IceSSL/EndpointI.java
index 8a5f29fd40a..8ccd13656fc 100644
--- a/java/src/IceSSL/EndpointI.java
+++ b/java/src/IceSSL/EndpointI.java
@@ -28,6 +28,7 @@ final class EndpointI extends IceInternal.EndpointI
public
EndpointI(Instance instance, String str, boolean oaEndpoint)
{
+ super(IceInternal.Protocol.currentProtocol, instance.defaultEncoding());
_instance = instance;
_host = null;
_port = 0;
@@ -170,6 +171,7 @@ final class EndpointI extends IceInternal.EndpointI
public
EndpointI(Instance instance, IceInternal.BasicStream s)
{
+ super(new Ice.ProtocolVersion(), new Ice.EncodingVersion());
_instance = instance;
s.startReadEncaps();
_host = s.readString();
diff --git a/java/src/IceSSL/Instance.java b/java/src/IceSSL/Instance.java
index 8c0f5934c3a..4a8c1d3638b 100644
--- a/java/src/IceSSL/Instance.java
+++ b/java/src/IceSSL/Instance.java
@@ -647,6 +647,12 @@ class Instance
return _facade.getProtocolSupport();
}
+ Ice.EncodingVersion
+ defaultEncoding()
+ {
+ return _facade.getDefaultEncoding();
+ }
+
String
defaultHost()
{