View Javadoc

1   package test.crispy.example.service.corba;
2   
3   
4   /**
5   * test/crispy/example/service/corba/_EchoStub.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 _EchoStub extends org.omg.CORBA.portable.ObjectImpl implements test.crispy.example.service.corba.Echo
12  {
13  
14  private static final long serialVersionUID = -8307817167993101438L;
15  
16  public String ping ()
17    {
18              org.omg.CORBA.portable.InputStream $in = null;
19              try {
20                  org.omg.CORBA.portable.OutputStream $out = _request ("ping", true);
21                  $in = _invoke ($out);
22                  String $result = $in.read_string ();
23                  return $result;
24              } catch (org.omg.CORBA.portable.ApplicationException $ex) {
25                  $in = $ex.getInputStream ();
26                  String _id = $ex.getId ();
27                  throw new org.omg.CORBA.MARSHAL (_id);
28              } catch (org.omg.CORBA.portable.RemarshalException $rm) {
29                  return ping (        );
30              } finally {
31                  _releaseReply ($in);
32              }
33    } // ping
34  
35    public String echo (String pvEchoStr)
36    {
37              org.omg.CORBA.portable.InputStream $in = null;
38              try {
39                  org.omg.CORBA.portable.OutputStream $out = _request ("echo", true);
40                  $out.write_string (pvEchoStr);
41                  $in = _invoke ($out);
42                  String $result = $in.read_string ();
43                  return $result;
44              } catch (org.omg.CORBA.portable.ApplicationException $ex) {
45                  $in = $ex.getInputStream ();
46                  String _id = $ex.getId ();
47                  throw new org.omg.CORBA.MARSHAL (_id);
48              } catch (org.omg.CORBA.portable.RemarshalException $rm) {
49                  return echo (pvEchoStr        );
50              } finally {
51                  _releaseReply ($in);
52              }
53    } // echo
54  
55    public test.crispy.example.service.corba.Customer rename (test.crispy.example.service.corba.Customer customer, String newLastName)
56    {
57              org.omg.CORBA.portable.InputStream $in = null;
58              try {
59                  org.omg.CORBA.portable.OutputStream $out = _request ("rename", true);
60                  test.crispy.example.service.corba.CustomerHelper.write ($out, customer);
61                  $out.write_string (newLastName);
62                  $in = _invoke ($out);
63                  test.crispy.example.service.corba.Customer $result = test.crispy.example.service.corba.CustomerHelper.read ($in);
64                  return $result;
65              } catch (org.omg.CORBA.portable.ApplicationException $ex) {
66                  $in = $ex.getInputStream ();
67                  String _id = $ex.getId ();
68                  throw new org.omg.CORBA.MARSHAL (_id);
69              } catch (org.omg.CORBA.portable.RemarshalException $rm) {
70                  return rename (customer, newLastName        );
71              } finally {
72                  _releaseReply ($in);
73              }
74    } // rename
75  
76    // Type-specific CORBA::Object operations
77    private static String[] __ids = {
78      "IDL:test/crispy/example/service/corba/Echo:1.0"};
79  
80    public String[] _ids ()
81    {
82      return (String[])__ids.clone ();
83    }
84  
85    private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
86    {
87       String str = s.readUTF ();
88       String[] args = null;
89       java.util.Properties props = null;
90       org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
91       org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
92       _set_delegate (delegate);
93    }
94  
95    private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
96    {
97       String[] args = null;
98       java.util.Properties props = null;
99       String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
100      s.writeUTF (str);
101   }
102 } // class _EchoStub