KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > iiop > interfaces > _IdlInterfaceStub


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.iiop.interfaces;
23
24
25 /**
26 * org/jboss/test/iiop/interfaces/_IdlInterfaceStub.java .
27 * Generated by the IDL-to-Java compiler (portable), version "3.1"
28 * from IdlInterface.idl
29 * Tuesday, October 21, 2003 3:27:10 PM BRST
30 */

31
32 public class _IdlInterfaceStub extends org.omg.CORBA.portable.ObjectImpl JavaDoc implements org.jboss.test.iiop.interfaces.IdlInterface
33 {
34
35   public String JavaDoc echo (String JavaDoc s)
36   {
37             org.omg.CORBA.portable.InputStream JavaDoc $in = null;
38             try {
39                 org.omg.CORBA.portable.OutputStream JavaDoc $out = _request ("echo", true);
40                 $out.write_string (s);
41                 $in = _invoke ($out);
42                 String JavaDoc $result = $in.read_string ();
43                 return $result;
44             } catch (org.omg.CORBA.portable.ApplicationException JavaDoc $ex) {
45                 $in = $ex.getInputStream ();
46                 String JavaDoc _id = $ex.getId ();
47                 throw new org.omg.CORBA.MARSHAL JavaDoc (_id);
48             } catch (org.omg.CORBA.portable.RemarshalException JavaDoc $rm) {
49                 return echo (s );
50             } finally {
51                 _releaseReply ($in);
52             }
53   } // echo
54

55   // Type-specific CORBA::Object operations
56
private static String JavaDoc[] __ids = {
57     "IDL:org/jboss/test/iiop/interfaces/IdlInterface:1.0"};
58
59   public String JavaDoc[] _ids ()
60   {
61     return (String JavaDoc[])__ids.clone ();
62   }
63
64   private void readObject (java.io.ObjectInputStream JavaDoc s) throws java.io.IOException JavaDoc
65   {
66      String JavaDoc str = s.readUTF ();
67      String JavaDoc[] args = null;
68      java.util.Properties JavaDoc props = null;
69      org.omg.CORBA.Object JavaDoc obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
70      org.omg.CORBA.portable.Delegate JavaDoc delegate = ((org.omg.CORBA.portable.ObjectImpl JavaDoc) obj)._get_delegate ();
71      _set_delegate (delegate);
72   }
73
74   private void writeObject (java.io.ObjectOutputStream JavaDoc s) throws java.io.IOException JavaDoc
75   {
76      String JavaDoc[] args = null;
77      java.util.Properties JavaDoc props = null;
78      String JavaDoc str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
79      s.writeUTF (str);
80   }
81 } // class _IdlInterfaceStub
82
Popular Tags