1 package com.sun.corba.se.spi.activation; 2 3 4 10 11 public abstract class _LocatorImplBase extends org.omg.CORBA.portable.ObjectImpl 12 implements com.sun.corba.se.spi.activation.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 case 0: { 44 try { 45 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 46 String endPoint = in.read_string (); 47 com.sun.corba.se.spi.activation.LocatorPackage.ServerLocation $result = null; 48 $result = this.locateServer (serverId, endPoint); 49 out = $rh.createReply(); 50 com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationHelper.write (out, $result); 51 } catch (com.sun.corba.se.spi.activation.NoSuchEndPoint $ex) { 52 out = $rh.createExceptionReply (); 53 com.sun.corba.se.spi.activation.NoSuchEndPointHelper.write (out, $ex); 54 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 55 out = $rh.createExceptionReply (); 56 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 57 } catch (com.sun.corba.se.spi.activation.ServerHeldDown $ex) { 58 out = $rh.createExceptionReply (); 59 com.sun.corba.se.spi.activation.ServerHeldDownHelper.write (out, $ex); 60 } 61 break; 62 } 63 64 65 case 1: { 68 try { 69 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 70 String orbId = com.sun.corba.se.spi.activation.ORBidHelper.read (in); 71 com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationPerORB $result = null; 72 $result = this.locateServerForORB (serverId, orbId); 73 out = $rh.createReply(); 74 com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationPerORBHelper.write (out, $result); 75 } catch (com.sun.corba.se.spi.activation.InvalidORBid $ex) { 76 out = $rh.createExceptionReply (); 77 com.sun.corba.se.spi.activation.InvalidORBidHelper.write (out, $ex); 78 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 79 out = $rh.createExceptionReply (); 80 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 81 } catch (com.sun.corba.se.spi.activation.ServerHeldDown $ex) { 82 out = $rh.createExceptionReply (); 83 com.sun.corba.se.spi.activation.ServerHeldDownHelper.write (out, $ex); 84 } 85 break; 86 } 87 88 89 case 2: { 92 try { 93 String endPointType = in.read_string (); 94 int $result = (int)0; 95 $result = this.getEndpoint (endPointType); 96 out = $rh.createReply(); 97 out.write_long ($result); 98 } catch (com.sun.corba.se.spi.activation.NoSuchEndPoint $ex) { 99 out = $rh.createExceptionReply (); 100 com.sun.corba.se.spi.activation.NoSuchEndPointHelper.write (out, $ex); 101 } 102 break; 103 } 104 105 106 case 3: { 109 try { 110 com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationPerORB location = com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationPerORBHelper.read (in); 111 String endPointType = in.read_string (); 112 int $result = (int)0; 113 $result = this.getServerPortForType (location, endPointType); 114 out = $rh.createReply(); 115 out.write_long ($result); 116 } catch (com.sun.corba.se.spi.activation.NoSuchEndPoint $ex) { 117 out = $rh.createExceptionReply (); 118 com.sun.corba.se.spi.activation.NoSuchEndPointHelper.write (out, $ex); 119 } 120 break; 121 } 122 123 default: 124 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 125 } 126 127 return out; 128 } 130 private static String [] __ids = { 132 "IDL:activation/Locator:1.0"}; 133 134 public String [] _ids () 135 { 136 return (String [])__ids.clone (); 137 } 138 139 140 } | Popular Tags |