summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/FixedReference.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-02-08 20:17:26 +0000
committerMark Spruiell <mes@zeroc.com>2005-02-08 20:17:26 +0000
commit6b669e5ba099f8ae780faae2a4865fc611f178a9 (patch)
treea34ba4e9bcf23352147a8b95fc8d67ec6a08d65a /java/src/IceInternal/FixedReference.java
parentchanging sequence unmarshaling for fixed-length types (diff)
downloadice-6b669e5ba099f8ae780faae2a4865fc611f178a9.tar.bz2
ice-6b669e5ba099f8ae780faae2a4865fc611f178a9.tar.xz
ice-6b669e5ba099f8ae780faae2a4865fc611f178a9.zip
Reference fixes:
- Moving _secure to RoutableReference - Fixing changeDefault() - Fixing changeRouter() and changeLocator() to return appropriate values
Diffstat (limited to 'java/src/IceInternal/FixedReference.java')
-rw-r--r--java/src/IceInternal/FixedReference.java73
1 files changed, 41 insertions, 32 deletions
diff --git a/java/src/IceInternal/FixedReference.java b/java/src/IceInternal/FixedReference.java
index 2b997df7689..43c1b6c46bd 100644
--- a/java/src/IceInternal/FixedReference.java
+++ b/java/src/IceInternal/FixedReference.java
@@ -17,10 +17,9 @@ public class FixedReference extends Reference
java.util.Map ctx,
String fs,
int md,
- boolean sec,
Ice.ConnectionI[] fixedConns)
{
- super(inst, ident, ctx, fs, md, sec);
+ super(inst, ident, ctx, fs, md);
_fixedConnections = fixedConns;
}
@@ -30,6 +29,12 @@ public class FixedReference extends Reference
return _fixedConnections;
}
+ public boolean
+ getSecure()
+ {
+ return false;
+ }
+
public Endpoint[]
getEndpoints()
{
@@ -42,31 +47,10 @@ public class FixedReference extends Reference
return false;
}
- public void
- streamWrite(BasicStream s)
- throws Ice.MarshalException
- {
- Ice.MarshalException ex = new Ice.MarshalException();
- ex.reason = "Cannot marshal a fixed reference";
- throw ex;
- }
-
- public Ice.ConnectionI
- getConnection(Ice.BooleanHolder compress)
+ public Reference
+ changeSecure(boolean sec)
{
- Ice.ConnectionI[] filteredConns = filterConnections(_fixedConnections);
- if(filteredConns.length == 0)
- {
- Ice.NoEndpointException ex = new Ice.NoEndpointException();
- ex.proxy = toString();
- throw ex;
- }
-
- Ice.ConnectionI connection = filteredConns[0];
- assert(connection != null);
- compress.value = connection.endpoint().compress();
-
- return connection;
+ return this;
}
public Reference
@@ -82,12 +66,6 @@ public class FixedReference extends Reference
}
public Reference
- changeDefault()
- {
- return this;
- }
-
- public Reference
changeCollocationOptimization(boolean newCollocationOptimization)
{
return this;
@@ -96,6 +74,10 @@ public class FixedReference extends Reference
public Reference
changeCompress(boolean newCompress)
{
+ // TODO: FixedReferences should probably have a _compress flag,
+ // that gets its default from the fixed connection this reference
+ // refers to. This should be changable with changeCompress(), and
+ // reset in changeDefault().
return this;
}
@@ -105,6 +87,33 @@ public class FixedReference extends Reference
return this;
}
+ public void
+ streamWrite(BasicStream s)
+ throws Ice.MarshalException
+ {
+ Ice.MarshalException ex = new Ice.MarshalException();
+ ex.reason = "Cannot marshal a fixed reference";
+ throw ex;
+ }
+
+ public Ice.ConnectionI
+ getConnection(Ice.BooleanHolder compress)
+ {
+ Ice.ConnectionI[] filteredConns = filterConnections(_fixedConnections);
+ if(filteredConns.length == 0)
+ {
+ Ice.NoEndpointException ex = new Ice.NoEndpointException();
+ ex.proxy = toString();
+ throw ex;
+ }
+
+ Ice.ConnectionI connection = filteredConns[0];
+ assert(connection != null);
+ compress.value = connection.endpoint().compress();
+
+ return connection;
+ }
+
public boolean
equals(java.lang.Object obj)
{