summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Outgoing.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-10-27 20:06:22 +0000
committerBernard Normier <bernard@zeroc.com>2006-10-27 20:06:22 +0000
commitcf95cce15efb9e8d5226b94e8d080252336a491c (patch)
tree593f42dd1384cf44efd6a754035d8b0ded1a06a4 /java/src/IceInternal/Outgoing.java
parentundo previous merge (diff)
downloadice-cf95cce15efb9e8d5226b94e8d080252336a491c.tar.bz2
ice-cf95cce15efb9e8d5226b94e8d080252336a491c.tar.xz
ice-cf95cce15efb9e8d5226b94e8d080252336a491c.zip
Implicit Context implementation + test
Diffstat (limited to 'java/src/IceInternal/Outgoing.java')
-rw-r--r--java/src/IceInternal/Outgoing.java31
1 files changed, 19 insertions, 12 deletions
diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java
index 09979f49f11..9bc33f4a033 100644
--- a/java/src/IceInternal/Outgoing.java
+++ b/java/src/IceInternal/Outgoing.java
@@ -455,23 +455,30 @@ public final class Outgoing
_os.writeByte((byte)mode.value());
- if(context == null)
+ if(context != null)
{
- _os.writeSize(0);
+ //
+ // Explicit context
+ //
+ Ice.ContextHelper.write(_os, context);
}
else
{
- final int sz = context.size();
- _os.writeSize(sz);
- if(sz > 0)
+ //
+ // Implicit context
+ //
+ Ice.ImplicitContextI implicitContext =
+ _reference.getInstance().getImplicitContext();
+
+ java.util.Map prxContext = _reference.getContext();
+
+ if(implicitContext == null)
{
- java.util.Iterator i = context.entrySet().iterator();
- while(i.hasNext())
- {
- java.util.Map.Entry entry = (java.util.Map.Entry)i.next();
- _os.writeString((String)entry.getKey());
- _os.writeString((String)entry.getValue());
- }
+ Ice.ContextHelper.write(_os, prxContext);
+ }
+ else
+ {
+ implicitContext.write(prxContext, _os);
}
}