1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 public class _LocatorStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.PortableActivationIDL.Locator 12 { 13 14 15 19 public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType locateServer (String serverId, String endPoint) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 20 { 21 org.omg.CORBA.portable.InputStream $in = null; 22 try { 23 org.omg.CORBA.portable.OutputStream $out = _request ("locateServer", true); 24 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 25 $out.write_string (endPoint); 26 $in = _invoke ($out); 27 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypeHelper.read ($in); 28 return $result; 29 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 30 $in = $ex.getInputStream (); 31 String _id = $ex.getId (); 32 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 33 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 34 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 35 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 36 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 37 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 38 else 39 throw new org.omg.CORBA.MARSHAL (_id); 40 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 41 return locateServer (serverId, endPoint ); 42 } finally { 43 _releaseReply ($in); 44 } 45 } 47 48 52 public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB locateServerForORB (String serverId, String orbId) throws com.sun.corba.se.PortableActivationIDL.InvalidORBid, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 53 { 54 org.omg.CORBA.portable.InputStream $in = null; 55 try { 56 org.omg.CORBA.portable.OutputStream $out = _request ("locateServerForORB", true); 57 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 58 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 59 $in = _invoke ($out); 60 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.read ($in); 61 return $result; 62 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 63 $in = $ex.getInputStream (); 64 String _id = $ex.getId (); 65 if (_id.equals ("IDL:PortableActivationIDL/InvalidORBid:1.0")) 66 throw com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.read ($in); 67 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 68 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 69 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 70 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 71 else 72 throw new org.omg.CORBA.MARSHAL (_id); 73 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 74 return locateServerForORB (serverId, orbId ); 75 } finally { 76 _releaseReply ($in); 77 } 78 } 80 81 83 public int getEndpoint (String endPointType) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint 84 { 85 org.omg.CORBA.portable.InputStream $in = null; 86 try { 87 org.omg.CORBA.portable.OutputStream $out = _request ("getEndpoint", true); 88 $out.write_string (endPointType); 89 $in = _invoke ($out); 90 int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in); 91 return $result; 92 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 93 $in = $ex.getInputStream (); 94 String _id = $ex.getId (); 95 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 96 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 97 else 98 throw new org.omg.CORBA.MARSHAL (_id); 99 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 100 return getEndpoint (endPointType ); 101 } finally { 102 _releaseReply ($in); 103 } 104 } 106 107 110 public int getServerPortForType (com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB location, String endPointType) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint 111 { 112 org.omg.CORBA.portable.InputStream $in = null; 113 try { 114 org.omg.CORBA.portable.OutputStream $out = _request ("getServerPortForType", true); 115 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.write ($out, location); 116 $out.write_string (endPointType); 117 $in = _invoke ($out); 118 int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in); 119 return $result; 120 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 121 $in = $ex.getInputStream (); 122 String _id = $ex.getId (); 123 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 124 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 125 else 126 throw new org.omg.CORBA.MARSHAL (_id); 127 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 128 return getServerPortForType (location, endPointType ); 129 } finally { 130 _releaseReply ($in); 131 } 132 } 134 private static String [] __ids = { 136 "IDL:PortableActivationIDL/Locator:1.0"}; 137 138 public String [] _ids () 139 { 140 return (String [])__ids.clone (); 141 } 142 143 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 144 { 145 String str = s.readUTF (); 146 String [] args = null; 147 java.util.Properties props = null; 148 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 149 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 150 _set_delegate (delegate); 151 } 152 153 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 154 { 155 String [] args = null; 156 java.util.Properties props = null; 157 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 158 s.writeUTF (str); 159 } 160 } | Popular Tags |