KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jotm > _ControlImpl_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 _ControlImpl_Stub extends Stub JavaDoc implements Control,
24 Resource,
25 Coordinator,
26 Terminator JavaDoc,
27 RecoveryCoordinator {
28     
29     private static final String JavaDoc[] _type_ids = {
30         "RMI:org.objectweb.jotm.ControlImpl:0000000000000000",
31         "RMI:org.objectweb.jotm.Control:0000000000000000",
32         "RMI:org.objectweb.jotm.Resource:0000000000000000",
33         "RMI:org.objectweb.jotm.Coordinator:0000000000000000",
34         "RMI:org.objectweb.jotm.Terminator:0000000000000000",
35         "RMI:org.objectweb.jotm.RecoveryCoordinator:0000000000000000"
36     };
37     
38     public String JavaDoc[] _ids() {
39         return _type_ids;
40     }
41     
42     public Terminator JavaDoc get_terminator() throws RemoteException JavaDoc {
43         if (!Util.isLocal(this)) {
44             try {
45                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
46                 try {
47                     OutputStream JavaDoc out = _request("_get_J_terminator", true);
48                     in = _invoke(out);
49                     return (Terminator JavaDoc) PortableRemoteObject.narrow(in.read_Object(), Terminator JavaDoc.class);
50                 } catch (ApplicationException JavaDoc ex) {
51                     in = ex.getInputStream();
52                     String JavaDoc id = in.read_string();
53                     throw new UnexpectedException JavaDoc(id);
54                 } catch (RemarshalException JavaDoc ex) {
55                     return get_terminator();
56                 } finally {
57                     _releaseReply(in);
58                 }
59             } catch (SystemException JavaDoc ex) {
60                 throw Util.mapSystemException(ex);
61             }
62         } else {
63             ServantObject JavaDoc so = _servant_preinvoke("_get_J_terminator",ControlImpl.class);
64             if (so == null) {
65                 return get_terminator();
66             }
67             try {
68                 Terminator JavaDoc result = ((ControlImpl)so.servant).get_terminator();
69                 return (Terminator JavaDoc)Util.copyObject(result,_orb());
70             } catch (Throwable JavaDoc ex) {
71                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
72                 throw Util.wrapException(exCopy);
73             } finally {
74                 _servant_postinvoke(so);
75             }
76         }
77     }
78     
79     public Coordinator get_coordinator() throws RemoteException JavaDoc {
80         if (!Util.isLocal(this)) {
81             try {
82                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
83                 try {
84                     OutputStream JavaDoc out = _request("_get_J_coordinator", true);
85                     in = _invoke(out);
86                     return (Coordinator) PortableRemoteObject.narrow(in.read_Object(), Coordinator.class);
87                 } catch (ApplicationException JavaDoc ex) {
88                     in = ex.getInputStream();
89                     String JavaDoc id = in.read_string();
90                     throw new UnexpectedException JavaDoc(id);
91                 } catch (RemarshalException JavaDoc ex) {
92                     return get_coordinator();
93                 } finally {
94                     _releaseReply(in);
95                 }
96             } catch (SystemException JavaDoc ex) {
97                 throw Util.mapSystemException(ex);
98             }
99         } else {
100             ServantObject JavaDoc so = _servant_preinvoke("_get_J_coordinator",ControlImpl.class);
101             if (so == null) {
102                 return get_coordinator();
103             }
104             try {
105                 Coordinator result = ((ControlImpl)so.servant).get_coordinator();
106                 return (Coordinator)Util.copyObject(result,_orb());
107             } catch (Throwable JavaDoc ex) {
108                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
109                 throw Util.wrapException(exCopy);
110             } finally {
111                 _servant_postinvoke(so);
112             }
113         }
114     }
115     
116     public int prepare() throws RemoteException JavaDoc {
117         if (!Util.isLocal(this)) {
118             try {
119                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
120                 try {
121                     OutputStream JavaDoc out = _request("prepare", true);
122                     in = _invoke(out);
123                     return in.read_long();
124                 } catch (ApplicationException JavaDoc ex) {
125                     in = ex.getInputStream();
126                     String JavaDoc id = in.read_string();
127                     throw new UnexpectedException JavaDoc(id);
128                 } catch (RemarshalException JavaDoc ex) {
129                     return prepare();
130                 } finally {
131                     _releaseReply(in);
132                 }
133             } catch (SystemException JavaDoc ex) {
134                 throw Util.mapSystemException(ex);
135             }
136         } else {
137             ServantObject JavaDoc so = _servant_preinvoke("prepare",ControlImpl.class);
138             if (so == null) {
139                 return prepare();
140             }
141             try {
142                 return ((ControlImpl)so.servant).prepare();
143             } catch (Throwable JavaDoc ex) {
144                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
145                 throw Util.wrapException(exCopy);
146             } finally {
147                 _servant_postinvoke(so);
148             }
149         }
150     }
151     
152     public void rollback() throws RemoteException JavaDoc {
153         if (!Util.isLocal(this)) {
154             try {
155                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
156                 try {
157                     OutputStream JavaDoc out = _request("rollback", true);
158                     _invoke(out);
159                 } catch (ApplicationException JavaDoc ex) {
160                     in = ex.getInputStream();
161                     String JavaDoc id = in.read_string();
162                     throw new UnexpectedException JavaDoc(id);
163                 } catch (RemarshalException JavaDoc ex) {
164                     rollback();
165                 } finally {
166                     _releaseReply(in);
167                 }
168             } catch (SystemException JavaDoc ex) {
169                 throw Util.mapSystemException(ex);
170             }
171         } else {
172             ServantObject JavaDoc so = _servant_preinvoke("rollback",ControlImpl.class);
173             if (so == null) {
174                 rollback();
175                 return ;
176             }
177             try {
178                 ((ControlImpl)so.servant).rollback();
179             } catch (Throwable JavaDoc ex) {
180                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
181                 throw Util.wrapException(exCopy);
182             } finally {
183                 _servant_postinvoke(so);
184             }
185         }
186     }
187     
188     public void commit() throws RemoteException JavaDoc {
189         if (!Util.isLocal(this)) {
190             try {
191                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
192                 try {
193                     OutputStream JavaDoc out = _request("commit__", true);
194                     _invoke(out);
195                 } catch (ApplicationException JavaDoc ex) {
196                     in = ex.getInputStream();
197                     String JavaDoc id = in.read_string();
198                     throw new UnexpectedException JavaDoc(id);
199                 } catch (RemarshalException JavaDoc ex) {
200                     commit();
201                 } finally {
202                     _releaseReply(in);
203                 }
204             } catch (SystemException JavaDoc ex) {
205                 throw Util.mapSystemException(ex);
206             }
207         } else {
208             ServantObject JavaDoc so = _servant_preinvoke("commit__",ControlImpl.class);
209             if (so == null) {
210                 commit();
211                 return ;
212             }
213             try {
214                 ((ControlImpl)so.servant).commit();
215             } catch (Throwable JavaDoc ex) {
216                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
217                 throw Util.wrapException(exCopy);
218             } finally {
219                 _servant_postinvoke(so);
220             }
221         }
222     }
223     
224     public void commit_one_phase() throws RemoteException JavaDoc {
225         if (!Util.isLocal(this)) {
226             try {
227                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
228                 try {
229                     OutputStream JavaDoc out = _request("commit_one_phase", true);
230                     _invoke(out);
231                 } catch (ApplicationException JavaDoc ex) {
232                     in = ex.getInputStream();
233                     String JavaDoc id = in.read_string();
234                     throw new UnexpectedException JavaDoc(id);
235                 } catch (RemarshalException JavaDoc ex) {
236                     commit_one_phase();
237                 } finally {
238                     _releaseReply(in);
239                 }
240             } catch (SystemException JavaDoc ex) {
241                 throw Util.mapSystemException(ex);
242             }
243         } else {
244             ServantObject JavaDoc so = _servant_preinvoke("commit_one_phase",ControlImpl.class);
245             if (so == null) {
246                 commit_one_phase();
247                 return ;
248             }
249             try {
250                 ((ControlImpl)so.servant).commit_one_phase();
251             } catch (Throwable JavaDoc ex) {
252                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
253                 throw Util.wrapException(exCopy);
254             } finally {
255                 _servant_postinvoke(so);
256             }
257         }
258     }
259     
260     public void forget() throws RemoteException JavaDoc {
261         if (!Util.isLocal(this)) {
262             try {
263                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
264                 try {
265                     OutputStream JavaDoc out = _request("forget", true);
266                     _invoke(out);
267                 } catch (ApplicationException JavaDoc ex) {
268                     in = ex.getInputStream();
269                     String JavaDoc id = in.read_string();
270                     throw new UnexpectedException JavaDoc(id);
271                 } catch (RemarshalException JavaDoc ex) {
272                     forget();
273                 } finally {
274                     _releaseReply(in);
275                 }
276             } catch (SystemException JavaDoc ex) {
277                 throw Util.mapSystemException(ex);
278             }
279         } else {
280             ServantObject JavaDoc so = _servant_preinvoke("forget",ControlImpl.class);
281             if (so == null) {
282                 forget();
283                 return ;
284             }
285             try {
286                 ((ControlImpl)so.servant).forget();
287             } catch (Throwable JavaDoc ex) {
288                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
289                 throw Util.wrapException(exCopy);
290             } finally {
291                 _servant_postinvoke(so);
292             }
293         }
294     }
295     
296     public int get_status() throws RemoteException JavaDoc {
297         if (!Util.isLocal(this)) {
298             try {
299                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
300                 try {
301                     OutputStream JavaDoc out = _request("_get_J_status", true);
302                     in = _invoke(out);
303                     return in.read_long();
304                 } catch (ApplicationException JavaDoc ex) {
305                     in = ex.getInputStream();
306                     String JavaDoc id = in.read_string();
307                     throw new UnexpectedException JavaDoc(id);
308                 } catch (RemarshalException JavaDoc ex) {
309                     return get_status();
310                 } finally {
311                     _releaseReply(in);
312                 }
313             } catch (SystemException JavaDoc ex) {
314                 throw Util.mapSystemException(ex);
315             }
316         } else {
317             ServantObject JavaDoc so = _servant_preinvoke("_get_J_status",ControlImpl.class);
318             if (so == null) {
319                 return get_status();
320             }
321             try {
322                 return ((ControlImpl)so.servant).get_status();
323             } catch (Throwable JavaDoc ex) {
324                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
325                 throw Util.wrapException(exCopy);
326             } finally {
327                 _servant_postinvoke(so);
328             }
329         }
330     }
331     
332     public boolean is_same_transaction(Coordinator arg0) throws RemoteException JavaDoc {
333         if (!Util.isLocal(this)) {
334             try {
335                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
336                 try {
337                     OutputStream JavaDoc out = _request("is_same_transaction", true);
338                     Util.writeRemoteObject(out,arg0);
339                     in = _invoke(out);
340                     return in.read_boolean();
341                 } catch (ApplicationException JavaDoc ex) {
342                     in = ex.getInputStream();
343                     String JavaDoc id = in.read_string();
344                     throw new UnexpectedException JavaDoc(id);
345                 } catch (RemarshalException JavaDoc ex) {
346                     return is_same_transaction(arg0);
347                 } finally {
348                     _releaseReply(in);
349                 }
350             } catch (SystemException JavaDoc ex) {
351                 throw Util.mapSystemException(ex);
352             }
353         } else {
354             ServantObject JavaDoc so = _servant_preinvoke("is_same_transaction",ControlImpl.class);
355             if (so == null) {
356                 return is_same_transaction(arg0);
357             }
358             try {
359                 Coordinator arg0Copy = (Coordinator) Util.copyObject(arg0,_orb());
360                 return ((ControlImpl)so.servant).is_same_transaction(arg0Copy);
361             } catch (Throwable JavaDoc ex) {
362                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
363                 throw Util.wrapException(exCopy);
364             } finally {
365                 _servant_postinvoke(so);
366             }
367         }
368     }
369     
370     public RecoveryCoordinator register_resource(Resource arg0) throws RemoteException JavaDoc {
371         if (!Util.isLocal(this)) {
372             try {
373                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
374                 try {
375                     OutputStream JavaDoc out = _request("register_resource", true);
376                     Util.writeRemoteObject(out,arg0);
377                     in = _invoke(out);
378                     return (RecoveryCoordinator) PortableRemoteObject.narrow(in.read_Object(), RecoveryCoordinator.class);
379                 } catch (ApplicationException JavaDoc ex) {
380                     in = ex.getInputStream();
381                     String JavaDoc id = in.read_string();
382                     throw new UnexpectedException JavaDoc(id);
383                 } catch (RemarshalException JavaDoc ex) {
384                     return register_resource(arg0);
385                 } finally {
386                     _releaseReply(in);
387                 }
388             } catch (SystemException JavaDoc ex) {
389                 throw Util.mapSystemException(ex);
390             }
391         } else {
392             ServantObject JavaDoc so = _servant_preinvoke("register_resource",ControlImpl.class);
393             if (so == null) {
394                 return register_resource(arg0);
395             }
396             try {
397                 Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb());
398                 RecoveryCoordinator result = ((ControlImpl)so.servant).register_resource(arg0Copy);
399                 return (RecoveryCoordinator)Util.copyObject(result,_orb());
400             } catch (Throwable JavaDoc ex) {
401                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
402                 throw Util.wrapException(exCopy);
403             } finally {
404                 _servant_postinvoke(so);
405             }
406         }
407     }
408     
409     public void register_synchronization(RemoteSynchro arg0) throws RemoteException JavaDoc {
410         if (!Util.isLocal(this)) {
411             try {
412                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
413                 try {
414                     OutputStream JavaDoc out = _request("register_synchronization", true);
415                     Util.writeRemoteObject(out,arg0);
416                     _invoke(out);
417                 } catch (ApplicationException JavaDoc ex) {
418                     in = ex.getInputStream();
419                     String JavaDoc id = in.read_string();
420                     throw new UnexpectedException JavaDoc(id);
421                 } catch (RemarshalException JavaDoc ex) {
422                     register_synchronization(arg0);
423                 } finally {
424                     _releaseReply(in);
425                 }
426             } catch (SystemException JavaDoc ex) {
427                 throw Util.mapSystemException(ex);
428             }
429         } else {
430             ServantObject JavaDoc so = _servant_preinvoke("register_synchronization",ControlImpl.class);
431             if (so == null) {
432                 register_synchronization(arg0);
433                 return ;
434             }
435             try {
436                 RemoteSynchro arg0Copy = (RemoteSynchro) Util.copyObject(arg0,_orb());
437                 ((ControlImpl)so.servant).register_synchronization(arg0Copy);
438             } catch (Throwable JavaDoc ex) {
439                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
440                 throw Util.wrapException(exCopy);
441             } finally {
442                 _servant_postinvoke(so);
443             }
444         }
445     }
446     
447     public void rollback_only() throws RemoteException JavaDoc {
448         if (!Util.isLocal(this)) {
449             try {
450                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
451                 try {
452                     OutputStream JavaDoc out = _request("rollback_only", true);
453                     _invoke(out);
454                 } catch (ApplicationException JavaDoc ex) {
455                     in = ex.getInputStream();
456                     String JavaDoc id = in.read_string();
457                     throw new UnexpectedException JavaDoc(id);
458                 } catch (RemarshalException JavaDoc ex) {
459                     rollback_only();
460                 } finally {
461                     _releaseReply(in);
462                 }
463             } catch (SystemException JavaDoc ex) {
464                 throw Util.mapSystemException(ex);
465             }
466         } else {
467             ServantObject JavaDoc so = _servant_preinvoke("rollback_only",ControlImpl.class);
468             if (so == null) {
469                 rollback_only();
470                 return ;
471             }
472             try {
473                 ((ControlImpl)so.servant).rollback_only();
474             } catch (Throwable JavaDoc ex) {
475                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
476                 throw Util.wrapException(exCopy);
477             } finally {
478                 _servant_postinvoke(so);
479             }
480         }
481     }
482     
483     public String JavaDoc get_transaction_name() throws RemoteException JavaDoc {
484         if (!Util.isLocal(this)) {
485             try {
486                 org.omg.CORBA_2_3.portable.InputStream JavaDoc in = null;
487                 try {
488                     OutputStream JavaDoc out = _request("_get_J_transaction_name", true);
489                     in = (org.omg.CORBA_2_3.portable.InputStream JavaDoc)_invoke(out);
490                     return (String JavaDoc) in.read_value(String JavaDoc.class);
491                 } catch (ApplicationException JavaDoc ex) {
492                     in = (org.omg.CORBA_2_3.portable.InputStream JavaDoc) ex.getInputStream();
493                     String JavaDoc id = in.read_string();
494                     throw new UnexpectedException JavaDoc(id);
495                 } catch (RemarshalException JavaDoc ex) {
496                     return get_transaction_name();
497                 } finally {
498                     _releaseReply(in);
499                 }
500             } catch (SystemException JavaDoc ex) {
501                 throw Util.mapSystemException(ex);
502             }
503         } else {
504             ServantObject JavaDoc so = _servant_preinvoke("_get_J_transaction_name",ControlImpl.class);
505             if (so == null) {
506                 return get_transaction_name();
507             }
508             try {
509                 return ((ControlImpl)so.servant).get_transaction_name();
510             } catch (Throwable JavaDoc ex) {
511                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
512                 throw Util.wrapException(exCopy);
513             } finally {
514                 _servant_postinvoke(so);
515             }
516         }
517     }
518     
519     public void commit(boolean arg0) throws RemoteException JavaDoc {
520         if (!Util.isLocal(this)) {
521             try {
522                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
523                 try {
524                     OutputStream JavaDoc out = _request("commit__boolean", true);
525                     out.write_boolean(arg0);
526                     _invoke(out);
527                 } catch (ApplicationException JavaDoc ex) {
528                     in = ex.getInputStream();
529                     String JavaDoc id = in.read_string();
530                     throw new UnexpectedException JavaDoc(id);
531                 } catch (RemarshalException JavaDoc ex) {
532                     commit(arg0);
533                 } finally {
534                     _releaseReply(in);
535                 }
536             } catch (SystemException JavaDoc ex) {
537                 throw Util.mapSystemException(ex);
538             }
539         } else {
540             ServantObject JavaDoc so = _servant_preinvoke("commit__boolean",ControlImpl.class);
541             if (so == null) {
542                 commit(arg0);
543                 return ;
544             }
545             try {
546                 ((ControlImpl)so.servant).commit(arg0);
547             } catch (Throwable JavaDoc ex) {
548                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
549                 throw Util.wrapException(exCopy);
550             } finally {
551                 _servant_postinvoke(so);
552             }
553         }
554     }
555     
556     public int replay_completion(Resource arg0) throws RemoteException JavaDoc {
557         if (!Util.isLocal(this)) {
558             try {
559                 org.omg.CORBA.portable.InputStream JavaDoc in = null;
560                 try {
561                     OutputStream JavaDoc out = _request("replay_completion", true);
562                     Util.writeRemoteObject(out,arg0);
563                     in = _invoke(out);
564                     return in.read_long();
565                 } catch (ApplicationException JavaDoc ex) {
566                     in = ex.getInputStream();
567                     String JavaDoc id = in.read_string();
568                     throw new UnexpectedException JavaDoc(id);
569                 } catch (RemarshalException JavaDoc ex) {
570                     return replay_completion(arg0);
571                 } finally {
572                     _releaseReply(in);
573                 }
574             } catch (SystemException JavaDoc ex) {
575                 throw Util.mapSystemException(ex);
576             }
577         } else {
578             ServantObject JavaDoc so = _servant_preinvoke("replay_completion",ControlImpl.class);
579             if (so == null) {
580                 return replay_completion(arg0);
581             }
582             try {
583                 Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb());
584                 return ((ControlImpl)so.servant).replay_completion(arg0Copy);
585             } catch (Throwable JavaDoc ex) {
586                 Throwable JavaDoc exCopy = (Throwable JavaDoc)Util.copyObject(ex,_orb());
587                 throw Util.wrapException(exCopy);
588             } finally {
589                 _servant_postinvoke(so);
590             }
591         }
592     }
593 }
594
Popular Tags