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