diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-11-05 12:19:49 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-11-05 12:19:49 -0800 |
commit | 3c8924663df8629b33c2ddd38907c4bf2eeb83cd (patch) | |
tree | 83b63f2396201019163d140555e42d79f82e46d3 /java/src/IceInternal/BasicStream.java | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.bz2 ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.xz ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.zip |
- Fixing bug 2522 for Python. This involved adding the C++ class
UserExceptionWriter so that the Python extension can wrap a native
Python user exception into something that the C++ run time can
marshal. Also ported the changes to the servantLocator test.
- Implementing UserExceptionWriter in Java and C#.
- Consolidating the source files for the C# streaming API.
Diffstat (limited to 'java/src/IceInternal/BasicStream.java')
-rw-r--r-- | java/src/IceInternal/BasicStream.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/java/src/IceInternal/BasicStream.java b/java/src/IceInternal/BasicStream.java index 372b9875f33..2b15bdd6897 100644 --- a/java/src/IceInternal/BasicStream.java +++ b/java/src/IceInternal/BasicStream.java @@ -27,6 +27,7 @@ public class BasicStream initialize(IceInternal.Instance instance, boolean unlimited) { _instance = instance; + _closure = null; _unlimited = unlimited; allocate(1500); _capacity = _buf.capacity(); @@ -80,11 +81,29 @@ public class BasicStream return _instance; } + public Object + closure() + { + return _closure; + } + + public Object + closure(Object p) + { + Object prev = _closure; + _closure = p; + return prev; + } + public void swap(BasicStream other) { assert(_instance == other._instance); + Object tmpClosure = other._closure; + other._closure = _closure; + _closure = tmpClosure; + java.nio.ByteBuffer tmpBuf = other._buf; other._buf = _buf; _buf = tmpBuf; @@ -2294,6 +2313,7 @@ public class BasicStream } private IceInternal.Instance _instance; + private Object _closure; private java.nio.ByteBuffer _buf; private int _capacity; // Cache capacity to avoid excessive method calls. private int _limit; // Cache limit to avoid excessive method calls. |