summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-09-07 02:30:29 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-09-07 02:30:29 +0000
commit6f1ded4bb739128f167f8486aeaac273cccc88d3 (patch)
tree1e75c490cf1403aa2165a35aace9d779f26294bb /java/src
parenthttp://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=448 (diff)
downloadice-6f1ded4bb739128f167f8486aeaac273cccc88d3.tar.bz2
ice-6f1ded4bb739128f167f8486aeaac273cccc88d3.tar.xz
ice-6f1ded4bb739128f167f8486aeaac273cccc88d3.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=448
Diffstat (limited to 'java/src')
-rw-r--r--java/src/IceInternal/DirectReference.java3
-rw-r--r--java/src/IceInternal/FixedReference.java3
-rw-r--r--java/src/IceInternal/IndirectReference.java3
-rw-r--r--java/src/IceInternal/Instance.java10
-rw-r--r--java/src/IceInternal/Reference.java5
-rw-r--r--java/src/IceInternal/ReferenceFactory.java11
-rw-r--r--java/src/IceInternal/RoutableReference.java3
7 files changed, 20 insertions, 18 deletions
diff --git a/java/src/IceInternal/DirectReference.java b/java/src/IceInternal/DirectReference.java
index 13869aa97e1..1a0893281a3 100644
--- a/java/src/IceInternal/DirectReference.java
+++ b/java/src/IceInternal/DirectReference.java
@@ -13,6 +13,7 @@ public class DirectReference extends RoutableReference
{
public
DirectReference(Instance inst,
+ Ice.Communicator com,
Ice.Identity ident,
java.util.Map ctx,
String fs,
@@ -22,7 +23,7 @@ public class DirectReference extends RoutableReference
RouterInfo rtrInfo,
boolean collocationOpt)
{
- super(inst, ident, ctx, fs, md, sec, rtrInfo, collocationOpt);
+ super(inst, com, ident, ctx, fs, md, sec, rtrInfo, collocationOpt);
_endpoints = endpts;
}
diff --git a/java/src/IceInternal/FixedReference.java b/java/src/IceInternal/FixedReference.java
index 5865f7f480c..e677abf6ccb 100644
--- a/java/src/IceInternal/FixedReference.java
+++ b/java/src/IceInternal/FixedReference.java
@@ -13,13 +13,14 @@ public class FixedReference extends Reference
{
public
FixedReference(Instance inst,
+ Ice.Communicator com,
Ice.Identity ident,
java.util.Map ctx,
String fs,
int md,
Ice.ConnectionI[] fixedConns)
{
- super(inst, ident, ctx, fs, md);
+ super(inst, com, ident, ctx, fs, md);
_fixedConnections = fixedConns;
}
diff --git a/java/src/IceInternal/IndirectReference.java b/java/src/IceInternal/IndirectReference.java
index 2392472f4b2..8a7b57afb33 100644
--- a/java/src/IceInternal/IndirectReference.java
+++ b/java/src/IceInternal/IndirectReference.java
@@ -13,6 +13,7 @@ public class IndirectReference extends RoutableReference
{
public
IndirectReference(Instance inst,
+ Ice.Communicator com,
Ice.Identity ident,
java.util.Map ctx,
String fs,
@@ -23,7 +24,7 @@ public class IndirectReference extends RoutableReference
LocatorInfo locInfo,
boolean collocationOpt)
{
- super(inst, ident, ctx, fs, md, sec, rtrInfo, collocationOpt);
+ super(inst, com, ident, ctx, fs, md, sec, rtrInfo, collocationOpt);
_adapterId = adptid;
_locatorInfo = locInfo;
}
diff --git a/java/src/IceInternal/Instance.java b/java/src/IceInternal/Instance.java
index 40b91467d97..ccbd703ceae 100644
--- a/java/src/IceInternal/Instance.java
+++ b/java/src/IceInternal/Instance.java
@@ -11,11 +11,6 @@ package IceInternal;
public final class Instance
{
- public Ice.Communicator communicator()
- {
- return _communicator;
- }
-
public Ice.Properties
properties()
{
@@ -317,7 +312,6 @@ public final class Instance
public
Instance(Ice.Communicator communicator, Ice.Properties properties)
{
- _communicator = communicator;
_state = StateActive;
_properties = properties;
@@ -454,7 +448,7 @@ public final class Instance
_locatorManager = new LocatorManager();
- _referenceFactory = new ReferenceFactory(this);
+ _referenceFactory = new ReferenceFactory(this, communicator);
_proxyFactory = new ProxyFactory(this);
@@ -723,8 +717,6 @@ public final class Instance
}
}
- private Ice.Communicator _communicator;
-
private static final int StateActive = 0;
private static final int StateDestroyInProgress = 1;
private static final int StateDestroyed = 2;
diff --git a/java/src/IceInternal/Reference.java b/java/src/IceInternal/Reference.java
index d8a5f79102b..8fb52100283 100644
--- a/java/src/IceInternal/Reference.java
+++ b/java/src/IceInternal/Reference.java
@@ -64,7 +64,7 @@ public abstract class Reference implements Cloneable
public final Ice.Communicator getCommunicator()
{
- return _instance.communicator();
+ return _communicator;
}
public abstract boolean getSecure();
@@ -387,6 +387,7 @@ public abstract class Reference implements Cloneable
}
private Instance _instance;
+ private Ice.Communicator _communicator;
private int _mode;
private Ice.Identity _identity;
@@ -400,6 +401,7 @@ public abstract class Reference implements Cloneable
protected
Reference(Instance inst,
+ Ice.Communicator communicator,
Ice.Identity ident,
java.util.Map ctx,
String fac,
@@ -413,6 +415,7 @@ public abstract class Reference implements Cloneable
assert(fac != null);
_instance = inst;
+ _communicator = communicator;
_mode = md;
_identity = ident;
_hasContext = ctx != null && !ctx.isEmpty();
diff --git a/java/src/IceInternal/ReferenceFactory.java b/java/src/IceInternal/ReferenceFactory.java
index 94220c8da7f..c3a35ee46c3 100644
--- a/java/src/IceInternal/ReferenceFactory.java
+++ b/java/src/IceInternal/ReferenceFactory.java
@@ -34,7 +34,7 @@ public final class ReferenceFactory
//
// Create new reference
//
- DirectReference ref = new DirectReference(_instance, ident, context, facet, mode, secure,
+ DirectReference ref = new DirectReference(_instance, _communicator, ident, context, facet, mode, secure,
endpoints, routerInfo, collocationOptimization);
return updateCache(ref);
}
@@ -63,7 +63,7 @@ public final class ReferenceFactory
//
// Create new reference
//
- IndirectReference ref = new IndirectReference(_instance, ident, context, facet, mode, secure,
+ IndirectReference ref = new IndirectReference(_instance, _communicator, ident, context, facet, mode, secure,
adapterId, routerInfo, locatorInfo, collocationOptimization);
return updateCache(ref);
}
@@ -88,7 +88,7 @@ public final class ReferenceFactory
//
// Create new reference
//
- FixedReference ref = new FixedReference(_instance, ident, context, facet, mode, fixedConnections);
+ FixedReference ref = new FixedReference(_instance, _communicator, ident, context, facet, mode, fixedConnections);
return updateCache(ref);
}
@@ -577,9 +577,10 @@ public final class ReferenceFactory
//
// Only for use by Instance
//
- ReferenceFactory(Instance instance)
+ ReferenceFactory(Instance instance, Ice.Communicator communicator)
{
_instance = instance;
+ _communicator = communicator;
}
synchronized void
@@ -591,6 +592,7 @@ public final class ReferenceFactory
}
_instance = null;
+ _communicator = null;
_defaultRouter = null;
_defaultLocator = null;
_references.clear();
@@ -632,6 +634,7 @@ public final class ReferenceFactory
}
private Instance _instance;
+ private Ice.Communicator _communicator;
private Ice.RouterPrx _defaultRouter;
private Ice.LocatorPrx _defaultLocator;
private java.util.WeakHashMap _references = new java.util.WeakHashMap();
diff --git a/java/src/IceInternal/RoutableReference.java b/java/src/IceInternal/RoutableReference.java
index 3b044e790ab..d59c553eee9 100644
--- a/java/src/IceInternal/RoutableReference.java
+++ b/java/src/IceInternal/RoutableReference.java
@@ -117,6 +117,7 @@ public abstract class RoutableReference extends Reference
protected
RoutableReference(Instance inst,
+ Ice.Communicator com,
Ice.Identity ident,
java.util.Map ctx,
String fac,
@@ -125,7 +126,7 @@ public abstract class RoutableReference extends Reference
RouterInfo rtrInfo,
boolean collocationOpt)
{
- super(inst, ident, ctx, fac, md);
+ super(inst, com, ident, ctx, fac, md);
_secure = sec;
_routerInfo = rtrInfo;
_collocationOptimization = collocationOpt;