1 package test.crispy.example.service.corba;
2
3
4 /**
5 * test/crispy/example/service/corba/_CalculatorStub.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from Echo.idl
8 * Donnerstag, 13. April 2006 19.25 Uhr CEST
9 */
10
11 public class _CalculatorStub extends org.omg.CORBA.portable.ObjectImpl implements test.crispy.example.service.corba.Calculator
12 {
13
14 private static final long serialVersionUID = 2004828829567366458L;
15
16 public int add (int a, int b)
17 {
18 org.omg.CORBA.portable.InputStream $in = null;
19 try {
20 org.omg.CORBA.portable.OutputStream $out = _request ("add", true);
21 $out.write_long (a);
22 $out.write_long (b);
23 $in = _invoke ($out);
24 int $result = $in.read_long ();
25 return $result;
26 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
27 $in = $ex.getInputStream ();
28 String _id = $ex.getId ();
29 throw new org.omg.CORBA.MARSHAL (_id);
30 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
31 return add (a, b );
32 } finally {
33 _releaseReply ($in);
34 }
35 }
36
37 public int subtract (int a, int b)
38 {
39 org.omg.CORBA.portable.InputStream $in = null;
40 try {
41 org.omg.CORBA.portable.OutputStream $out = _request ("subtract", true);
42 $out.write_long (a);
43 $out.write_long (b);
44 $in = _invoke ($out);
45 int $result = $in.read_long ();
46 return $result;
47 } catch (org.omg.CORBA.portable.ApplicationException $ex) {
48 $in = $ex.getInputStream ();
49 String _id = $ex.getId ();
50 throw new org.omg.CORBA.MARSHAL (_id);
51 } catch (org.omg.CORBA.portable.RemarshalException $rm) {
52 return subtract (a, b );
53 } finally {
54 _releaseReply ($in);
55 }
56 }
57
58
59 private static String[] __ids = {
60 "IDL:test/crispy/example/service/corba/Calculator:1.0"};
61
62 public String[] _ids ()
63 {
64 return (String[])__ids.clone ();
65 }
66
67 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
68 {
69 String str = s.readUTF ();
70 String[] args = null;
71 java.util.Properties props = null;
72 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
73 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
74 _set_delegate (delegate);
75 }
76
77 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
78 {
79 String[] args = null;
80 java.util.Properties props = null;
81 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
82 s.writeUTF (str);
83 }
84 }