1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 public abstract class _RepositoryImplBase extends org.omg.CORBA.portable.ObjectImpl 12 implements com.sun.corba.se.PortableActivationIDL.Repository, org.omg.CORBA.portable.InvokeHandler 13 { 14 15 public _RepositoryImplBase () 17 { 18 } 19 20 private static java.util.Hashtable _methods = new java.util.Hashtable (); 21 static 22 { 23 _methods.put ("registerServer", new java.lang.Integer (0)); 24 _methods.put ("unregisterServer", new java.lang.Integer (1)); 25 _methods.put ("getServer", new java.lang.Integer (2)); 26 _methods.put ("isInstalled", new java.lang.Integer (3)); 27 _methods.put ("install", new java.lang.Integer (4)); 28 _methods.put ("uninstall", new java.lang.Integer (5)); 29 _methods.put ("listRegisteredServers", new java.lang.Integer (6)); 30 _methods.put ("getApplicationNames", new java.lang.Integer (7)); 31 _methods.put ("getServerID", new java.lang.Integer (8)); 32 } 33 34 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 35 org.omg.CORBA.portable.InputStream in, 36 org.omg.CORBA.portable.ResponseHandler $rh) 37 { 38 org.omg.CORBA.portable.OutputStream out = null; 39 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 40 if (__method == null) 41 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 42 43 switch (__method.intValue ()) 44 { 45 46 50 case 0: { 52 try { 53 com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDef serverDef = com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDefHelper.read (in); 54 String $result = null; 55 $result = this.registerServer (serverDef); 56 out = $rh.createReply(); 57 out.write_string ($result); 58 } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyRegistered $ex) { 59 out = $rh.createExceptionReply (); 60 com.sun.corba.se.PortableActivationIDL.ServerAlreadyRegisteredHelper.write (out, $ex); 61 } catch (com.sun.corba.se.PortableActivationIDL.BadServerDefinition $ex) { 62 out = $rh.createExceptionReply (); 63 com.sun.corba.se.PortableActivationIDL.BadServerDefinitionHelper.write (out, $ex); 64 } 65 break; 66 } 67 68 69 71 case 1: { 73 try { 74 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 75 this.unregisterServer (serverId); 76 out = $rh.createReply(); 77 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 78 out = $rh.createExceptionReply (); 79 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 80 } 81 break; 82 } 83 84 85 87 case 2: { 89 try { 90 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 91 com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDef $result = null; 92 $result = this.getServer (serverId); 93 out = $rh.createReply(); 94 com.sun.corba.se.PortableActivationIDL.RepositoryPackage.ServerDefHelper.write (out, $result); 95 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 96 out = $rh.createExceptionReply (); 97 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 98 } 99 break; 100 } 101 102 103 105 case 3: { 107 try { 108 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 109 boolean $result = false; 110 $result = this.isInstalled (serverId); 111 out = $rh.createReply(); 112 out.write_boolean ($result); 113 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 114 out = $rh.createExceptionReply (); 115 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 116 } 117 break; 118 } 119 120 121 124 case 4: { 126 try { 127 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 128 this.install (serverId); 129 out = $rh.createReply(); 130 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 131 out = $rh.createExceptionReply (); 132 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 133 } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalled $ex) { 134 out = $rh.createExceptionReply (); 135 com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalledHelper.write (out, $ex); 136 } 137 break; 138 } 139 140 141 144 case 5: { 146 try { 147 String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in); 148 this.uninstall (serverId); 149 out = $rh.createReply(); 150 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 151 out = $rh.createExceptionReply (); 152 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 153 } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled $ex) { 154 out = $rh.createExceptionReply (); 155 com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.write (out, $ex); 156 } 157 break; 158 } 159 160 161 163 case 6: { 165 String $result[] = null; 166 $result = this.listRegisteredServers (); 167 out = $rh.createReply(); 168 com.sun.corba.se.PortableActivationIDL.ServerIdsHelper.write (out, $result); 169 break; 170 } 171 172 173 176 case 7: { 178 String $result[] = null; 179 $result = this.getApplicationNames (); 180 out = $rh.createReply(); 181 com.sun.corba.se.PortableActivationIDL.RepositoryPackage.AppNamesHelper.write (out, $result); 182 break; 183 } 184 185 186 188 case 8: { 190 try { 191 String applicationName = in.read_string (); 192 String $result = null; 193 $result = this.getServerID (applicationName); 194 out = $rh.createReply(); 195 out.write_string ($result); 196 } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) { 197 out = $rh.createExceptionReply (); 198 com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex); 199 } 200 break; 201 } 202 203 default: 204 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 205 } 206 207 return out; 208 } 210 private static String [] __ids = { 212 "IDL:PortableActivationIDL/Repository:1.0"}; 213 214 public String [] _ids () 215 { 216 return (String [])__ids.clone (); 217 } 218 219 220 } | Popular Tags |