1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 public class _ActivatorStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.PortableActivationIDL.Activator 12 { 13 14 15 17 public void registerServer (String serverId, com.sun.corba.se.PortableActivationIDL.ServerProxy serverObj) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 18 { 19 org.omg.CORBA.portable.InputStream $in = null; 20 try { 21 org.omg.CORBA.portable.OutputStream $out = _request ("registerServer", true); 22 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 23 com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.write ($out, serverObj); 24 $in = _invoke ($out); 25 return; 26 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 27 $in = $ex.getInputStream (); 28 String _id = $ex.getId (); 29 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 30 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 31 else 32 throw new org.omg.CORBA.MARSHAL (_id); 33 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 34 registerServer (serverId, serverObj ); 35 } finally { 36 _releaseReply ($in); 37 } 38 } 40 41 45 public void serverGoingDown (String serverId) 46 { 47 org.omg.CORBA.portable.InputStream $in = null; 48 try { 49 org.omg.CORBA.portable.OutputStream $out = _request ("serverGoingDown", true); 50 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 51 $in = _invoke ($out); 52 return; 53 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 54 $in = $ex.getInputStream (); 55 String _id = $ex.getId (); 56 throw new org.omg.CORBA.MARSHAL (_id); 57 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 58 serverGoingDown (serverId ); 59 } finally { 60 _releaseReply ($in); 61 } 62 } 64 65 70 public void registerORB (String serverId, String orbId, com.sun.corba.se.PortableActivationIDL.ORBProxy orb, com.sun.corba.se.PortableActivationIDL.EndPointInfo[] endPointInfo) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint, com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegistered 71 { 72 org.omg.CORBA.portable.InputStream $in = null; 73 try { 74 org.omg.CORBA.portable.OutputStream $out = _request ("registerORB", true); 75 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 76 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 77 com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.write ($out, orb); 78 com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.write ($out, endPointInfo); 79 $in = _invoke ($out); 80 return; 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 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 87 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 88 else if (_id.equals ("IDL:PortableActivationIDL/ORBAlreadyRegistered:1.0")) 89 throw com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegisteredHelper.read ($in); 90 else 91 throw new org.omg.CORBA.MARSHAL (_id); 92 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 93 registerORB (serverId, orbId, orb, endPointInfo ); 94 } finally { 95 _releaseReply ($in); 96 } 97 } 99 100 104 public org.omg.PortableInterceptor.ObjectReferenceTemplate registerPOA (String serverId, String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate) 105 { 106 org.omg.CORBA.portable.InputStream $in = null; 107 try { 108 org.omg.CORBA.portable.OutputStream $out = _request ("registerPOA", true); 109 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 110 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 111 org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate); 112 $in = _invoke ($out); 113 org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in); 114 return $result; 115 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 116 $in = $ex.getInputStream (); 117 String _id = $ex.getId (); 118 throw new org.omg.CORBA.MARSHAL (_id); 119 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 120 return registerPOA (serverId, orbId, poaTemplate ); 121 } finally { 122 _releaseReply ($in); 123 } 124 } 126 127 129 public void poaDestroyed (String serverId, String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate) 130 { 131 org.omg.CORBA.portable.InputStream $in = null; 132 try { 133 org.omg.CORBA.portable.OutputStream $out = _request ("poaDestroyed", true); 134 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 135 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 136 org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate); 137 $in = _invoke ($out); 138 return; 139 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 140 $in = $ex.getInputStream (); 141 String _id = $ex.getId (); 142 throw new org.omg.CORBA.MARSHAL (_id); 143 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 144 poaDestroyed (serverId, orbId, poaTemplate ); 145 } finally { 146 _releaseReply ($in); 147 } 148 } 150 151 154 public void activate (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerAlreadyActive, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 155 { 156 org.omg.CORBA.portable.InputStream $in = null; 157 try { 158 org.omg.CORBA.portable.OutputStream $out = _request ("activate", true); 159 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 160 $in = _invoke ($out); 161 return; 162 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 163 $in = $ex.getInputStream (); 164 String _id = $ex.getId (); 165 if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyActive:1.0")) 166 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyActiveHelper.read ($in); 167 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 168 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 169 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 170 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 171 else 172 throw new org.omg.CORBA.MARSHAL (_id); 173 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 174 activate (serverId ); 175 } finally { 176 _releaseReply ($in); 177 } 178 } 180 181 183 public void shutdown (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotActive, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 184 { 185 org.omg.CORBA.portable.InputStream $in = null; 186 try { 187 org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", true); 188 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 189 $in = _invoke ($out); 190 return; 191 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 192 $in = $ex.getInputStream (); 193 String _id = $ex.getId (); 194 if (_id.equals ("IDL:PortableActivationIDL/ServerNotActive:1.0")) 195 throw com.sun.corba.se.PortableActivationIDL.ServerNotActiveHelper.read ($in); 196 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 197 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 198 else 199 throw new org.omg.CORBA.MARSHAL (_id); 200 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 201 shutdown (serverId ); 202 } finally { 203 _releaseReply ($in); 204 } 205 } 207 208 211 public void install (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown, com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalled 212 { 213 org.omg.CORBA.portable.InputStream $in = null; 214 try { 215 org.omg.CORBA.portable.OutputStream $out = _request ("install", true); 216 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 217 $in = _invoke ($out); 218 return; 219 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 220 $in = $ex.getInputStream (); 221 String _id = $ex.getId (); 222 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 223 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 224 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 225 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 226 else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyInstalled:1.0")) 227 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalledHelper.read ($in); 228 else 229 throw new org.omg.CORBA.MARSHAL (_id); 230 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 231 install (serverId ); 232 } finally { 233 _releaseReply ($in); 234 } 235 } 237 238 242 public void uninstall (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown, com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled 243 { 244 org.omg.CORBA.portable.InputStream $in = null; 245 try { 246 org.omg.CORBA.portable.OutputStream $out = _request ("uninstall", true); 247 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 248 $in = _invoke ($out); 249 return; 250 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 251 $in = $ex.getInputStream (); 252 String _id = $ex.getId (); 253 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 254 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 255 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 256 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 257 else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyUninstalled:1.0")) 258 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.read ($in); 259 else 260 throw new org.omg.CORBA.MARSHAL (_id); 261 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 262 uninstall (serverId ); 263 } finally { 264 _releaseReply ($in); 265 } 266 } 268 269 271 public String [] getActiveServers () 272 { 273 org.omg.CORBA.portable.InputStream $in = null; 274 try { 275 org.omg.CORBA.portable.OutputStream $out = _request ("getActiveServers", true); 276 $in = _invoke ($out); 277 String $result[] = com.sun.corba.se.PortableActivationIDL.ServerIdsHelper.read ($in); 278 return $result; 279 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 280 $in = $ex.getInputStream (); 281 String _id = $ex.getId (); 282 throw new org.omg.CORBA.MARSHAL (_id); 283 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 284 return getActiveServers ( ); 285 } finally { 286 _releaseReply ($in); 287 } 288 } 290 291 293 public String [] getORBNames (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 294 { 295 org.omg.CORBA.portable.InputStream $in = null; 296 try { 297 org.omg.CORBA.portable.OutputStream $out = _request ("getORBNames", true); 298 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 299 $in = _invoke ($out); 300 String $result[] = com.sun.corba.se.PortableActivationIDL.ORBidListHelper.read ($in); 301 return $result; 302 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 303 $in = $ex.getInputStream (); 304 String _id = $ex.getId (); 305 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 306 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 307 else 308 throw new org.omg.CORBA.MARSHAL (_id); 309 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 310 return getORBNames (serverId ); 311 } finally { 312 _releaseReply ($in); 313 } 314 } 316 317 320 public org.omg.PortableInterceptor.ObjectReferenceTemplate lookupPOATemplate (String serverId, String orbId, String [] orbAdapterName) 321 { 322 org.omg.CORBA.portable.InputStream $in = null; 323 try { 324 org.omg.CORBA.portable.OutputStream $out = _request ("lookupPOATemplate", true); 325 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 326 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 327 org.omg.PortableInterceptor.AdapterNameHelper.write ($out, orbAdapterName); 328 $in = _invoke ($out); 329 org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in); 330 return $result; 331 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 332 $in = $ex.getInputStream (); 333 String _id = $ex.getId (); 334 throw new org.omg.CORBA.MARSHAL (_id); 335 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 336 return lookupPOATemplate (serverId, orbId, orbAdapterName ); 337 } finally { 338 _releaseReply ($in); 339 } 340 } 342 private static String [] __ids = { 344 "IDL:PortableActivationIDL/Activator:1.0"}; 345 346 public String [] _ids () 347 { 348 return (String [])__ids.clone (); 349 } 350 351 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 352 { 353 String str = s.readUTF (); 354 String [] args = null; 355 java.util.Properties props = null; 356 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 357 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 358 _set_delegate (delegate); 359 } 360 361 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 362 { 363 String [] args = null; 364 java.util.Properties props = null; 365 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 366 s.writeUTF (str); 367 } 368 } | Popular Tags |