KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jotm > _Control_Stub


1 // Stub class generated by rmic, do not edit.
2
// Contents subject to change without notice.
3

4 package org.objectweb.jotm;
5
6 import java.io.Serializable JavaDoc;
7 import java.rmi.Remote JavaDoc;
8 import java.rmi.RemoteException JavaDoc;
9 import java.rmi.UnexpectedException JavaDoc;
10 import javax.rmi.CORBA.Stub JavaDoc;
11 import javax.rmi.CORBA.Util JavaDoc;
12 import javax.rmi.PortableRemoteObject JavaDoc;
13 import org.omg.CORBA.ORB JavaDoc;
14 import org.omg.CORBA.SystemException JavaDoc;
15 import org.omg.CORBA.portable.ApplicationException JavaDoc;
16 import org.omg.CORBA.portable.InputStream JavaDoc;
17 import org.omg.CORBA.portable.OutputStream JavaDoc;
18 import org.omg.CORBA.portable.RemarshalException JavaDoc;
19 import org.omg.CORBA.portable.ResponseHandler JavaDoc;
20 import org.omg.CORBA.portable.ServantObject JavaDoc;
21
22
23 public class _Control_Stub extends Stub JavaDoc implements Control {
24     
25     private static final String JavaDoc[] _type_ids = {
26         "RMI:org.objectweb.jotm.Control:0000000000000000"
27     };
28     
29     public String JavaDoc[] _ids() {
30         return _type_ids;
31     }
32     
33     public Terminator JavaDoc get_terminator() throws RemoteException JavaDoc {
34         if (!Util.isLocal(this)) {
35             try {
36                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
37                 try {
38                     OutputStream JavaDoc out = _request("_get_J_terminator", true);
39                     in = _invoke(out);
40                     return (Terminator JavaDoc) PortableRemoteObject.narrow(in.read_Object(), Terminator JavaDoc.class);
41                 } catch (ApplicationException JavaDoc ex) {
42                     in = ex.getInputStream();
43                     String JavaDoc id = in.read_string();
44                     throw new UnexpectedException JavaDoc(id);
45                 } catch (RemarshalException JavaDoc ex) {
46                     return get_terminator();
47                 } finally {
48                     _releaseReply(in);
49                 }
50             } catch (SystemException JavaDoc ex) {
51                 throw Util.mapSystemException(ex);
52             }
53         } else {
54             ServantObject JavaDoc so = _servant_preinvoke("_get_J_terminator",Control.class);
55             if (so == null) {
56                 return get_terminator();
57             }
58             try {
59                 Terminator JavaDoc result = ((Control)so.servant).get_terminator();
60                 return (Terminator JavaDoc)Util.copyObject(result,_orb());
61             } catch (Throwable JavaDoc ex) {
62                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
63                 throw Util.wrapException(exCopy);
64             } finally {
65                 _servant_postinvoke(so);
66             }
67         }
68     }
69     
70     public Coordinator get_coordinator() throws RemoteException JavaDoc {
71         if (!Util.isLocal(this)) {
72             try {
73                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
74                 try {
75                     OutputStream JavaDoc out = _request("_get_J_coordinator", true);
76                     in = _invoke(out);
77                     return (Coordinator) PortableRemoteObject.narrow(in.read_Object(), Coordinator.class);
78                 } catch (ApplicationException JavaDoc ex) {
79                     in = ex.getInputStream();
80                     String JavaDoc id = in.read_string();
81                     throw new UnexpectedException JavaDoc(id);
82                 } catch (RemarshalException JavaDoc ex) {
83                     return get_coordinator();
84                 } finally {
85                     _releaseReply(in);
86                 }
87             } catch (SystemException JavaDoc ex) {
88                 throw Util.mapSystemException(ex);
89             }
90         } else {
91             ServantObject JavaDoc so = _servant_preinvoke("_get_J_coordinator",Control.class);
92             if (so == null) {
93                 return get_coordinator();
94             }
95             try {
96                 Coordinator result = ((Control)so.servant).get_coordinator();
97                 return (Coordinator)Util.copyObject(result,_orb());
98             } catch (Throwable JavaDoc ex) {
99                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
100                 throw Util.wrapException(exCopy);
101             } finally {
102                 _servant_postinvoke(so);
103             }
104         }
105     }
106 }
107
Popular Tags