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