diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-10-27 20:06:22 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-10-27 20:06:22 +0000 |
commit | cf95cce15efb9e8d5226b94e8d080252336a491c (patch) | |
tree | 593f42dd1384cf44efd6a754035d8b0ded1a06a4 /java/src/IceInternal/OutgoingAsync.java | |
parent | undo previous merge (diff) | |
download | ice-cf95cce15efb9e8d5226b94e8d080252336a491c.tar.bz2 ice-cf95cce15efb9e8d5226b94e8d080252336a491c.tar.xz ice-cf95cce15efb9e8d5226b94e8d080252336a491c.zip |
Implicit Context implementation + test
Diffstat (limited to 'java/src/IceInternal/OutgoingAsync.java')
-rw-r--r-- | java/src/IceInternal/OutgoingAsync.java | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/java/src/IceInternal/OutgoingAsync.java b/java/src/IceInternal/OutgoingAsync.java index b8c58de5288..7f79fcefd7c 100644 --- a/java/src/IceInternal/OutgoingAsync.java +++ b/java/src/IceInternal/OutgoingAsync.java @@ -295,26 +295,33 @@ public abstract class OutgoingAsync __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 = + ref.getInstance().getImplicitContext(); + + java.util.Map prxContext = ref.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); } } - + __os.startWriteEncaps(); } catch(Ice.LocalException ex) |