KickJava   Java API By Example, From Geeks To Geeks.

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


1 // Tie 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 javax.rmi.CORBA.Tie JavaDoc;
10 import javax.rmi.CORBA.Util JavaDoc;
11 import javax.rmi.PortableRemoteObject JavaDoc;
12 import org.omg.CORBA.BAD_OPERATION JavaDoc;
13 import org.omg.CORBA.ORB JavaDoc;
14 import org.omg.CORBA.SystemException JavaDoc;
15 import org.omg.CORBA.portable.InputStream JavaDoc;
16 import org.omg.CORBA.portable.OutputStream JavaDoc;
17 import org.omg.CORBA.portable.ResponseHandler JavaDoc;
18 import org.omg.CORBA.portable.UnknownException JavaDoc;
19 import org.omg.CORBA_2_3.portable.ObjectImpl JavaDoc;
20
21
22 public class _TransactionFactoryImpl_Tie extends ObjectImpl JavaDoc implements Tie JavaDoc {
23     
24     private TransactionFactoryImpl target = null;
25     
26     private static final String JavaDoc[] _type_ids = {
27         "RMI:org.objectweb.jotm.TransactionFactory:0000000000000000"
28     };
29     
30     public void setTarget(Remote JavaDoc target) {
31         this.target = (TransactionFactoryImpl) target;
32     }
33     
34     public Remote JavaDoc getTarget() {
35         return target;
36     }
37     
38     public org.omg.CORBA.Object JavaDoc thisObject() {
39         return this;
40     }
41     
42     public void deactivate() {
43         _orb().disconnect(this);
44         _set_delegate(null);
45         target = null;
46     }
47     
48     public ORB JavaDoc orb() {
49         return _orb();
50     }
51     
52     public void orb(ORB JavaDoc orb) {
53         orb.connect(this);
54     }
55     
56     public String JavaDoc[] _ids() {
57         return _type_ids;
58     }
59     
60     public OutputStream JavaDoc _invoke(String JavaDoc method, InputStream JavaDoc _in, ResponseHandler JavaDoc reply) throws SystemException JavaDoc {
61         try {
62             org.omg.CORBA_2_3.portable.InputStream JavaDoc in =
63                 (org.omg.CORBA_2_3.portable.InputStream JavaDoc) _in;
64             switch (method.length()) {
65                 case 6:
66                     if (method.equals("create")) {
67                         int arg0 = in.read_long();
68                         Control result = target.create(arg0);
69                         OutputStream JavaDoc out = reply.createReply();
70                         Util.writeRemoteObject(out,result);
71                         return out;
72                     }
73                 case 8:
74                     if (method.equals("recreate")) {
75                         TransactionContext arg0 = (TransactionContext) in.read_value(TransactionContext.class);
76                         Control result = target.recreate(arg0);
77                         OutputStream JavaDoc out = reply.createReply();
78                         Util.writeRemoteObject(out,result);
79                         return out;
80                     }
81                 case 13:
82                     if (method.equals("_get_hostName")) {
83                         String JavaDoc result = target.getHostName();
84                         org.omg.CORBA_2_3.portable.OutputStream JavaDoc out =
85                             (org.omg.CORBA_2_3.portable.OutputStream JavaDoc) reply.createReply();
86                         out.write_value(result,String JavaDoc.class);
87                         return out;
88                     }
89                 case 15:
90                     if (method.equals("_get_portNumber")) {
91                         int result = target.getPortNumber();
92                         OutputStream JavaDoc out = reply.createReply();
93                         out.write_long(result);
94                         return out;
95                     }
96             }
97             throw new BAD_OPERATION JavaDoc();
98         } catch (SystemException JavaDoc ex) {
99             throw ex;
100         } catch (Throwable JavaDoc ex) {
101             throw new UnknownException JavaDoc(ex);
102         }
103     }
104 }
105
Popular Tags