summaryrefslogtreecommitdiff
path: root/java/test/Ice/exceptions/ThrowerI.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2002-01-17 20:38:49 +0000
committerMark Spruiell <mes@zeroc.com>2002-01-17 20:38:49 +0000
commit0ab7f17f4b0312ff8f21d68095e1118133111816 (patch)
treede9f855f06a356bde49835620d96b6fd9a397f9f /java/test/Ice/exceptions/ThrowerI.java
parentunicode tests (diff)
downloadice-0ab7f17f4b0312ff8f21d68095e1118133111816.tar.bz2
ice-0ab7f17f4b0312ff8f21d68095e1118133111816.tar.xz
ice-0ab7f17f4b0312ff8f21d68095e1118133111816.zip
adding server
Diffstat (limited to 'java/test/Ice/exceptions/ThrowerI.java')
-rw-r--r--java/test/Ice/exceptions/ThrowerI.java140
1 files changed, 140 insertions, 0 deletions
diff --git a/java/test/Ice/exceptions/ThrowerI.java b/java/test/Ice/exceptions/ThrowerI.java
new file mode 100644
index 00000000000..0eb0fe8f6b7
--- /dev/null
+++ b/java/test/Ice/exceptions/ThrowerI.java
@@ -0,0 +1,140 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+// Ice version 0.0.1
+
+public final class ThrowerI extends _ThrowerDisp
+{
+ public
+ ThrowerI(Ice.ObjectAdapter adapter)
+ {
+ _adapter = adapter;
+ }
+
+ public void
+ shutdown(Ice.Current current)
+ {
+ _adapter.getCommunicator().shutdown();
+ }
+
+ public boolean
+ supportsUndeclaredExceptions(Ice.Current current)
+ {
+ return false;
+ }
+
+ public void
+ throwAasA(int a, Ice.Current current)
+ throws A
+ {
+ A ex = new A();
+ ex.a = a;
+ throw ex;
+ }
+
+ public void
+ throwAorDasAorD(int a, Ice.Current current)
+ throws A,
+ D
+ {
+ if (a > 0)
+ {
+ A ex = new A();
+ ex.a = a;
+ throw ex;
+ }
+ else
+ {
+ D ex = new D();
+ ex.d = a;
+ throw ex;
+ }
+ }
+
+ public void
+ throwBasA(int a, int b, Ice.Current current)
+ throws A
+ {
+ throwBasB(a, b, current);
+ }
+
+ public void
+ throwBasB(int a, int b, Ice.Current current)
+ throws B
+ {
+ B ex = new B();
+ ex.a = a;
+ ex.b = b;
+ throw ex;
+ }
+
+ public void
+ throwCasA(int a, int b, int c, Ice.Current current)
+ throws A
+ {
+ throwCasC(a, b, c, current);
+ }
+
+ public void
+ throwCasB(int a, int b, int c, Ice.Current current)
+ throws B
+ {
+ throwCasC(a, b, c, current);
+ }
+
+ public void
+ throwCasC(int a, int b, int c, Ice.Current current)
+ throws C
+ {
+ C ex = new C();
+ ex.a = a;
+ ex.b = b;
+ ex.c = c;
+ throw ex;
+ }
+
+ public void
+ throwLocalException(Ice.Current current)
+ {
+ throw new Ice.TimeoutException();
+ }
+
+ public void
+ throwNonIceException(Ice.Current current)
+ {
+ throw new RuntimeException();
+ }
+
+ public void
+ throwUndeclaredA(int a, Ice.Current current)
+ throws B,
+ D
+ {
+ // Not possible in Java
+ throw new Ice.UnknownUserException();
+ }
+
+ public void
+ throwUndeclaredB(int a, int b, Ice.Current current)
+ {
+ // Not possible in Java
+ throw new Ice.UnknownUserException();
+ }
+
+ public void
+ throwUndeclaredC(int a, int b, int c, Ice.Current current)
+ throws D
+ {
+ // Not possible in Java
+ throw new Ice.UnknownUserException();
+ }
+
+ private Ice.ObjectAdapter _adapter;
+}