summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/IndirectReference.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-06-07 14:57:29 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-06-07 14:57:29 +0000
commit9a4d145795d6efb52f030d45bae67d5860d0a9fe (patch)
treea35afe688cbf6536eb82ed02e5e873b4c275ddfb /java/src/IceInternal/IndirectReference.java
parentFixed Glacier2 filtering in IceGrid and added tests. (diff)
downloadice-9a4d145795d6efb52f030d45bae67d5860d0a9fe.tar.bz2
ice-9a4d145795d6efb52f030d45bae67d5860d0a9fe.tar.xz
ice-9a4d145795d6efb52f030d45bae67d5860d0a9fe.zip
Fixed bug where timeout, compress and connection id attributes were not
taken into account for routed endpoints.
Diffstat (limited to 'java/src/IceInternal/IndirectReference.java')
-rw-r--r--java/src/IceInternal/IndirectReference.java81
1 files changed, 1 insertions, 80 deletions
diff --git a/java/src/IceInternal/IndirectReference.java b/java/src/IceInternal/IndirectReference.java
index edd52236b18..88c1faeb225 100644
--- a/java/src/IceInternal/IndirectReference.java
+++ b/java/src/IceInternal/IndirectReference.java
@@ -27,8 +27,6 @@ public class IndirectReference extends RoutableReference
{
super(inst, com, ident, ctx, fs, md, sec, rtrInfo, collocationOpt);
_adapterId = adptid;
- _overrideTimeout = false;
- _timeout = 0;
_locatorInfo = locInfo;
_locatorCacheTimeout = locatorCacheTimeout;
}
@@ -71,44 +69,6 @@ public class IndirectReference extends RoutableReference
}
public Reference
- changeCompress(boolean newCompress)
- {
- if(_overrideCompress && _compress == newCompress)
- {
- return this;
- }
- IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this);
- r._compress = newCompress;
- r._overrideCompress = true;
- return r;
- }
-
- public Reference
- changeTimeout(int newTimeout)
- {
- if(_overrideTimeout && _timeout == newTimeout)
- {
- return this;
- }
- IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this);
- r._timeout = newTimeout;
- r._overrideTimeout = true;
- return r;
- }
-
- public Reference
- changeConnectionId(String id)
- {
- if(_connectionId.equals(id))
- {
- return this;
- }
- IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this);
- r._connectionId = id;
- return r;
- }
-
- public Reference
changeAdapterId(String newAdapterId)
{
if(_adapterId.equals(newAdapterId))
@@ -208,21 +168,7 @@ public class IndirectReference extends RoutableReference
endpts = _locatorInfo.getEndpoints(this, _locatorCacheTimeout, cached);
}
- //
- // Apply the endpoint overrides to each endpoint.
- //
- for(int i = 0; i < endpts.length; ++i)
- {
- endpts[i] = endpts[i].connectionId(_connectionId);
- if(_overrideCompress)
- {
- endpts[i] = endpts[i].compress(_compress);
- }
- if(_overrideTimeout)
- {
- endpts[i] = endpts[i].timeout(_timeout);
- }
- }
+ applyOverrides(endpts);
try
{
@@ -311,26 +257,6 @@ public class IndirectReference extends RoutableReference
{
return false;
}
- if(!_connectionId.equals(rhs._connectionId))
- {
- return false;
- }
- if(_overrideCompress != rhs._overrideCompress)
- {
- return false;
- }
- if(_overrideCompress && _compress != rhs._compress)
- {
- return false;
- }
- if(_overrideTimeout != rhs._overrideTimeout)
- {
- return false;
- }
- if(_overrideTimeout && _timeout != rhs._timeout)
- {
- return false;
- }
if(_locatorInfo == null ? rhs._locatorInfo != null : !_locatorInfo.equals(rhs._locatorInfo))
{
return false;
@@ -339,11 +265,6 @@ public class IndirectReference extends RoutableReference
}
private String _adapterId;
- private String _connectionId = "";
private LocatorInfo _locatorInfo;
- private boolean _overrideCompress;
- private boolean _compress; // Only used if _overrideCompress == true
- private boolean _overrideTimeout;
- private int _timeout; // Only used if _overrideTimeout == true
private int _locatorCacheTimeout;
}