1 package com.sun.corba.se.spi.activation; 2 3 4 10 11 public abstract class _RepositoryImplBase extends org.omg.CORBA.portable.ObjectImpl 12 implements com.sun.corba.se.spi.activation.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 case 0: { 49 try { 50 com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef serverDef = com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.read (in); 51 int $result = (int)0; 52 $result = this.registerServer (serverDef); 53 out = $rh.createReply(); 54 out.write_long ($result); 55 } catch (com.sun.corba.se.spi.activation.ServerAlreadyRegistered $ex) { 56 out = $rh.createExceptionReply (); 57 com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.write (out, $ex); 58 } catch (com.sun.corba.se.spi.activation.BadServerDefinition $ex) { 59 out = $rh.createExceptionReply (); 60 com.sun.corba.se.spi.activation.BadServerDefinitionHelper.write (out, $ex); 61 } 62 break; 63 } 64 65 66 case 1: { 69 try { 70 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 71 this.unregisterServer (serverId); 72 out = $rh.createReply(); 73 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 74 out = $rh.createExceptionReply (); 75 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 76 } 77 break; 78 } 79 80 81 case 2: { 84 try { 85 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 86 com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef $result = null; 87 $result = this.getServer (serverId); 88 out = $rh.createReply(); 89 com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.write (out, $result); 90 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 91 out = $rh.createExceptionReply (); 92 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 93 } 94 break; 95 } 96 97 98 case 3: { 101 try { 102 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 103 boolean $result = false; 104 $result = this.isInstalled (serverId); 105 out = $rh.createReply(); 106 out.write_boolean ($result); 107 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 108 out = $rh.createExceptionReply (); 109 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 110 } 111 break; 112 } 113 114 115 case 4: { 118 try { 119 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 120 this.install (serverId); 121 out = $rh.createReply(); 122 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 123 out = $rh.createExceptionReply (); 124 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 125 } catch (com.sun.corba.se.spi.activation.ServerAlreadyInstalled $ex) { 126 out = $rh.createExceptionReply (); 127 com.sun.corba.se.spi.activation.ServerAlreadyInstalledHelper.write (out, $ex); 128 } 129 break; 130 } 131 132 133 case 5: { 136 try { 137 int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read (in); 138 this.uninstall (serverId); 139 out = $rh.createReply(); 140 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 141 out = $rh.createExceptionReply (); 142 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 143 } catch (com.sun.corba.se.spi.activation.ServerAlreadyUninstalled $ex) { 144 out = $rh.createExceptionReply (); 145 com.sun.corba.se.spi.activation.ServerAlreadyUninstalledHelper.write (out, $ex); 146 } 147 break; 148 } 149 150 151 case 6: { 154 int $result[] = null; 155 $result = this.listRegisteredServers (); 156 out = $rh.createReply(); 157 com.sun.corba.se.spi.activation.ServerIdsHelper.write (out, $result); 158 break; 159 } 160 161 162 case 7: { 165 String $result[] = null; 166 $result = this.getApplicationNames (); 167 out = $rh.createReply(); 168 com.sun.corba.se.spi.activation.RepositoryPackage.StringSeqHelper.write (out, $result); 169 break; 170 } 171 172 173 case 8: { 176 try { 177 String applicationName = in.read_string (); 178 int $result = (int)0; 179 $result = this.getServerID (applicationName); 180 out = $rh.createReply(); 181 out.write_long ($result); 182 } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) { 183 out = $rh.createExceptionReply (); 184 com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write (out, $ex); 185 } 186 break; 187 } 188 189 default: 190 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 191 } 192 193 return out; 194 } 196 private static String [] __ids = { 198 "IDL:activation/Repository:1.0"}; 199 200 public String [] _ids () 201 { 202 return (String [])__ids.clone (); 203 } 204 205 206 } | Popular Tags |