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 _Control_Stub extends Stub implements Control { 24 25 private static final String [] _type_ids = { 26 "RMI:org.objectweb.jotm.Control:0000000000000000" 27 }; 28 29 public String [] _ids() { 30 return _type_ids; 31 } 32 33 public Terminator get_terminator() throws RemoteException { 34 if (!Util.isLocal(this)) { 35 try { 36 org.omg.CORBA.portable.InputStream in = null; 37 try { 38 OutputStream out = _request("_get_J_terminator", true); 39 in = _invoke(out); 40 return (Terminator ) PortableRemoteObject.narrow(in.read_Object(), Terminator .class); 41 } catch (ApplicationException ex) { 42 in = ex.getInputStream(); 43 String id = in.read_string(); 44 throw new UnexpectedException (id); 45 } catch (RemarshalException ex) { 46 return get_terminator(); 47 } finally { 48 _releaseReply(in); 49 } 50 } catch (SystemException ex) { 51 throw Util.mapSystemException(ex); 52 } 53 } else { 54 ServantObject so = _servant_preinvoke("_get_J_terminator",Control.class); 55 if (so == null) { 56 return get_terminator(); 57 } 58 try { 59 Terminator result = ((Control)so.servant).get_terminator(); 60 return (Terminator )Util.copyObject(result,_orb()); 61 } catch (Throwable ex) { 62 Throwable exCopy = (Throwable )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 { 71 if (!Util.isLocal(this)) { 72 try { 73 org.omg.CORBA.portable.InputStream in = null; 74 try { 75 OutputStream out = _request("_get_J_coordinator", true); 76 in = _invoke(out); 77 return (Coordinator) PortableRemoteObject.narrow(in.read_Object(), Coordinator.class); 78 } catch (ApplicationException ex) { 79 in = ex.getInputStream(); 80 String id = in.read_string(); 81 throw new UnexpectedException (id); 82 } catch (RemarshalException ex) { 83 return get_coordinator(); 84 } finally { 85 _releaseReply(in); 86 } 87 } catch (SystemException ex) { 88 throw Util.mapSystemException(ex); 89 } 90 } else { 91 ServantObject 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 ex) { 99 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 100 throw Util.wrapException(exCopy); 101 } finally { 102 _servant_postinvoke(so); 103 } 104 } 105 } 106 } 107 | Popular Tags |