1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 public abstract class _LocatorImplBase extends org.omg.CORBA.portable.ObjectImpl 12 implements com.sun.corba.se.PortableActivationIDL.Locator, org.omg.CORBA.portable.InvokeHandler 13 { 14 15 public _LocatorImplBase () 17 { 18 } 19 20 private static java.util.Hashtable _methods = new java.util.Hashtable (); 21 static 22 { 23 _methods.put ("locateServer", new java.lang.Integer (0)); 24 _methods.put ("locateServerForORB", new java.lang.Integer (1)); 25 _methods.put ("getEndpoint", new java.lang.Integer (2)); 26 _methods.put ("getServerPortForType", new java.lang.Integer (3)); 27 } 28 29 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 30 org.omg.CORBA.portable.InputStream in, 31 org.omg.CORBA.portable.ResponseHandler $rh) 32 { 33 org.omg.CORBA.portable.OutputStream out = null; 34 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 35 if (__method == null) 36 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 37 38 switch (__method.intValue ()) 39 { 40 41 45 case 0: { 47 try { 48 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 49 String endPoint = in.read_string (); 50 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType $result = null; 51 $result = this.locateServer (serverId, endPoint); 52 out = $rh.createReply(); 53 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypeHelper.write (out, $result); 54 } catch (com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint $ex) { 55 out = $rh.createExceptionReply (); 56 com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.write (out, $ex); 57 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 58 out = $rh.createExceptionReply (); 59 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 60 } catch (com.sun.corba.se.PortableActivationIDL.ServerHeldDown $ex) { 61 out = $rh.createExceptionReply (); 62 com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.write (out, $ex); 63 } 64 break; 65 } 66 67 68 72 case 1: { 74 try { 75 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 76 String orbId = org.omg.PortableInterceptor.ORBIdHelper.read (in); 77 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB $result = null; 78 $result = this.locateServerForORB (serverId, orbId); 79 out = $rh.createReply(); 80 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.write (out, $result); 81 } catch (com.sun.corba.se.PortableActivationIDL.InvalidORBid $ex) { 82 out = $rh.createExceptionReply (); 83 com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.write (out, $ex); 84 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 85 out = $rh.createExceptionReply (); 86 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 87 } catch (com.sun.corba.se.PortableActivationIDL.ServerHeldDown $ex) { 88 out = $rh.createExceptionReply (); 89 com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.write (out, $ex); 90 } 91 break; 92 } 93 94 95 97 case 2: { 99 try { 100 String endPointType = in.read_string (); 101 int $result = (int)0; 102 $result = this.getEndpoint (endPointType); 103 out = $rh.createReply(); 104 out.write_long ($result); 105 } catch (com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint $ex) { 106 out = $rh.createExceptionReply (); 107 com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.write (out, $ex); 108 } 109 break; 110 } 111 112 113 116 case 3: { 118 try { 119 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB location = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.read (in); 120 String endPointType = in.read_string (); 121 int $result = (int)0; 122 $result = this.getServerPortForType (location, endPointType); 123 out = $rh.createReply(); 124 out.write_long ($result); 125 } catch (com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint $ex) { 126 out = $rh.createExceptionReply (); 127 com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.write (out, $ex); 128 } 129 break; 130 } 131 132 default: 133 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 134 } 135 136 return out; 137 } 139 private static String [] __ids = { 141 "IDL:PortableActivationIDL/Locator:1.0"}; 142 143 public String [] _ids () 144 { 145 return (String [])__ids.clone (); 146 } 147 148 149 } | Popular Tags |