diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-06-01 15:18:35 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-06-01 15:18:35 -0700 |
commit | f8f74e93981c92113c486b6c5b2752de36e95752 (patch) | |
tree | 85ba37ff9eed6bf417ad3ab1c3343415c7f9c421 /java/src/Ice/UserExceptionReader.java | |
parent | removing hasObjects/clearObjects from SlicedData (diff) | |
download | ice-f8f74e93981c92113c486b6c5b2752de36e95752.tar.bz2 ice-f8f74e93981c92113c486b6c5b2752de36e95752.tar.xz ice-f8f74e93981c92113c486b6c5b2752de36e95752.zip |
Java port
Diffstat (limited to 'java/src/Ice/UserExceptionReader.java')
-rw-r--r-- | java/src/Ice/UserExceptionReader.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/java/src/Ice/UserExceptionReader.java b/java/src/Ice/UserExceptionReader.java new file mode 100644 index 00000000000..375756b7228 --- /dev/null +++ b/java/src/Ice/UserExceptionReader.java @@ -0,0 +1,58 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +package Ice; + +/** + * Allows a Dynamic Ice application to instantiate a user exception and + * intercept its unmarshaling. + * + * @see InputStream + **/ +public abstract class UserExceptionReader extends UserException +{ + /** + * Creates a reader for the given communicator. + **/ + public UserExceptionReader(Communicator communicator) + { + _communicator = communicator; + } + + /** + * Unmarshal an exception from an output stream. + * + * @param in The input stream. + **/ + public abstract void read(Ice.InputStream is); + + public void __write(IceInternal.BasicStream os) + { + assert(false); + } + + public void __read(IceInternal.BasicStream is) + { + InputStream stream = (InputStream)is.closure(); + assert(stream != null); + read(stream); + } + + public void __write(Ice.OutputStream os) + { + assert(false); + } + + public void __read(Ice.InputStream is) + { + read(is); + } + + protected Communicator _communicator; +} |