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