summaryrefslogtreecommitdiff
path: root/java/src/Ice/UserExceptionReader.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-06-01 15:18:35 -0700
committerMark Spruiell <mes@zeroc.com>2012-06-01 15:18:35 -0700
commitf8f74e93981c92113c486b6c5b2752de36e95752 (patch)
tree85ba37ff9eed6bf417ad3ab1c3343415c7f9c421 /java/src/Ice/UserExceptionReader.java
parentremoving hasObjects/clearObjects from SlicedData (diff)
downloadice-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.java58
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;
+}