1 package com.sun.corba.se.spi.activation; 2 3 4 10 11 public class _RepositoryStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.spi.activation.Repository 12 { 13 14 15 public int registerServer (com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef serverDef) throws com.sun.corba.se.spi.activation.ServerAlreadyRegistered, com.sun.corba.se.spi.activation.BadServerDefinition 17 { 18 org.omg.CORBA.portable.InputStream $in = null; 19 try { 20 org.omg.CORBA.portable.OutputStream $out = _request ("registerServer", true); 21 com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.write ($out, serverDef); 22 $in = _invoke ($out); 23 int $result = com.sun.corba.se.spi.activation.ServerIdHelper.read ($in); 24 return $result; 25 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 26 $in = $ex.getInputStream (); 27 String _id = $ex.getId (); 28 if (_id.equals ("IDL:activation/ServerAlreadyRegistered:1.0")) 29 throw com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.read ($in); 30 else if (_id.equals ("IDL:activation/BadServerDefinition:1.0")) 31 throw com.sun.corba.se.spi.activation.BadServerDefinitionHelper.read ($in); 32 else 33 throw new org.omg.CORBA.MARSHAL (_id); 34 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 35 return registerServer (serverDef ); 36 } finally { 37 _releaseReply ($in); 38 } 39 } 41 42 public void unregisterServer (int serverId) throws com.sun.corba.se.spi.activation.ServerNotRegistered 44 { 45 org.omg.CORBA.portable.InputStream $in = null; 46 try { 47 org.omg.CORBA.portable.OutputStream $out = _request ("unregisterServer", true); 48 com.sun.corba.se.spi.activation.ServerIdHelper.write ($out, serverId); 49 $in = _invoke ($out); 50 return; 51 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 52 $in = $ex.getInputStream (); 53 String _id = $ex.getId (); 54 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 55 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 56 else 57 throw new org.omg.CORBA.MARSHAL (_id); 58 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 59 unregisterServer (serverId ); 60 } finally { 61 _releaseReply ($in); 62 } 63 } 65 66 public com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef getServer (int serverId) throws com.sun.corba.se.spi.activation.ServerNotRegistered 68 { 69 org.omg.CORBA.portable.InputStream $in = null; 70 try { 71 org.omg.CORBA.portable.OutputStream $out = _request ("getServer", true); 72 com.sun.corba.se.spi.activation.ServerIdHelper.write ($out, serverId); 73 $in = _invoke ($out); 74 com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef $result = com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.read ($in); 75 return $result; 76 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 77 $in = $ex.getInputStream (); 78 String _id = $ex.getId (); 79 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 80 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 81 else 82 throw new org.omg.CORBA.MARSHAL (_id); 83 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 84 return getServer (serverId ); 85 } finally { 86 _releaseReply ($in); 87 } 88 } 90 91 public boolean isInstalled (int serverId) throws com.sun.corba.se.spi.activation.ServerNotRegistered 93 { 94 org.omg.CORBA.portable.InputStream $in = null; 95 try { 96 org.omg.CORBA.portable.OutputStream $out = _request ("isInstalled", true); 97 com.sun.corba.se.spi.activation.ServerIdHelper.write ($out, serverId); 98 $in = _invoke ($out); 99 boolean $result = $in.read_boolean (); 100 return $result; 101 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 102 $in = $ex.getInputStream (); 103 String _id = $ex.getId (); 104 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 105 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 106 else 107 throw new org.omg.CORBA.MARSHAL (_id); 108 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 109 return isInstalled (serverId ); 110 } finally { 111 _releaseReply ($in); 112 } 113 } 115 116 public void install (int serverId) throws com.sun.corba.se.spi.activation.ServerNotRegistered, com.sun.corba.se.spi.activation.ServerAlreadyInstalled 118 { 119 org.omg.CORBA.portable.InputStream $in = null; 120 try { 121 org.omg.CORBA.portable.OutputStream $out = _request ("install", true); 122 com.sun.corba.se.spi.activation.ServerIdHelper.write ($out, serverId); 123 $in = _invoke ($out); 124 return; 125 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 126 $in = $ex.getInputStream (); 127 String _id = $ex.getId (); 128 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 129 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 130 else if (_id.equals ("IDL:activation/ServerAlreadyInstalled:1.0")) 131 throw com.sun.corba.se.spi.activation.ServerAlreadyInstalledHelper.read ($in); 132 else 133 throw new org.omg.CORBA.MARSHAL (_id); 134 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 135 install (serverId ); 136 } finally { 137 _releaseReply ($in); 138 } 139 } 141 142 public void uninstall (int serverId) throws com.sun.corba.se.spi.activation.ServerNotRegistered, com.sun.corba.se.spi.activation.ServerAlreadyUninstalled 144 { 145 org.omg.CORBA.portable.InputStream $in = null; 146 try { 147 org.omg.CORBA.portable.OutputStream $out = _request ("uninstall", true); 148 com.sun.corba.se.spi.activation.ServerIdHelper.write ($out, serverId); 149 $in = _invoke ($out); 150 return; 151 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 152 $in = $ex.getInputStream (); 153 String _id = $ex.getId (); 154 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 155 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 156 else if (_id.equals ("IDL:activation/ServerAlreadyUninstalled:1.0")) 157 throw com.sun.corba.se.spi.activation.ServerAlreadyUninstalledHelper.read ($in); 158 else 159 throw new org.omg.CORBA.MARSHAL (_id); 160 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 161 uninstall (serverId ); 162 } finally { 163 _releaseReply ($in); 164 } 165 } 167 168 public int[] listRegisteredServers () 170 { 171 org.omg.CORBA.portable.InputStream $in = null; 172 try { 173 org.omg.CORBA.portable.OutputStream $out = _request ("listRegisteredServers", true); 174 $in = _invoke ($out); 175 int $result[] = com.sun.corba.se.spi.activation.ServerIdsHelper.read ($in); 176 return $result; 177 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 178 $in = $ex.getInputStream (); 179 String _id = $ex.getId (); 180 throw new org.omg.CORBA.MARSHAL (_id); 181 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 182 return listRegisteredServers ( ); 183 } finally { 184 _releaseReply ($in); 185 } 186 } 188 189 public String [] getApplicationNames () 191 { 192 org.omg.CORBA.portable.InputStream $in = null; 193 try { 194 org.omg.CORBA.portable.OutputStream $out = _request ("getApplicationNames", true); 195 $in = _invoke ($out); 196 String $result[] = com.sun.corba.se.spi.activation.RepositoryPackage.StringSeqHelper.read ($in); 197 return $result; 198 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 199 $in = $ex.getInputStream (); 200 String _id = $ex.getId (); 201 throw new org.omg.CORBA.MARSHAL (_id); 202 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 203 return getApplicationNames ( ); 204 } finally { 205 _releaseReply ($in); 206 } 207 } 209 210 public int getServerID (String applicationName) throws com.sun.corba.se.spi.activation.ServerNotRegistered 212 { 213 org.omg.CORBA.portable.InputStream $in = null; 214 try { 215 org.omg.CORBA.portable.OutputStream $out = _request ("getServerID", true); 216 $out.write_string (applicationName); 217 $in = _invoke ($out); 218 int $result = com.sun.corba.se.spi.activation.ServerIdHelper.read ($in); 219 return $result; 220 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 221 $in = $ex.getInputStream (); 222 String _id = $ex.getId (); 223 if (_id.equals ("IDL:activation/ServerNotRegistered:1.0")) 224 throw com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.read ($in); 225 else 226 throw new org.omg.CORBA.MARSHAL (_id); 227 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 228 return getServerID (applicationName ); 229 } finally { 230 _releaseReply ($in); 231 } 232 } 234 private static String [] __ids = { 236 "IDL:activation/Repository:1.0"}; 237 238 public String [] _ids () 239 { 240 return (String [])__ids.clone (); 241 } 242 243 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 244 { 245 String str = s.readUTF (); 246 String [] args = null; 247 java.util.Properties props = null; 248 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 249 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 250 _set_delegate (delegate); 251 } 252 253 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 254 { 255 String [] args = null; 256 java.util.Properties props = null; 257 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 258 s.writeUTF (str); 259 } 260 } | Popular Tags |