1 package com.sun.corba.se.PortableActivationIDL; 2 3 4 10 11 12 16 public class _ServerManagerStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.corba.se.PortableActivationIDL.ServerManager 17 { 18 19 20 22 public void registerServer (String serverId, com.sun.corba.se.PortableActivationIDL.ServerProxy serverObj) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 23 { 24 org.omg.CORBA.portable.InputStream $in = null; 25 try { 26 org.omg.CORBA.portable.OutputStream $out = _request ("registerServer", true); 27 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 28 com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.write ($out, serverObj); 29 $in = _invoke ($out); 30 return; 31 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 32 $in = $ex.getInputStream (); 33 String _id = $ex.getId (); 34 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 35 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 36 else 37 throw new org.omg.CORBA.MARSHAL (_id); 38 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 39 registerServer (serverId, serverObj ); 40 } finally { 41 _releaseReply ($in); 42 } 43 } 45 46 50 public void serverGoingDown (String serverId) 51 { 52 org.omg.CORBA.portable.InputStream $in = null; 53 try { 54 org.omg.CORBA.portable.OutputStream $out = _request ("serverGoingDown", true); 55 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 56 $in = _invoke ($out); 57 return; 58 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 59 $in = $ex.getInputStream (); 60 String _id = $ex.getId (); 61 throw new org.omg.CORBA.MARSHAL (_id); 62 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 63 serverGoingDown (serverId ); 64 } finally { 65 _releaseReply ($in); 66 } 67 } 69 70 75 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 76 { 77 org.omg.CORBA.portable.InputStream $in = null; 78 try { 79 org.omg.CORBA.portable.OutputStream $out = _request ("registerORB", true); 80 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 81 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 82 com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.write ($out, orb); 83 com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.write ($out, endPointInfo); 84 $in = _invoke ($out); 85 return; 86 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 87 $in = $ex.getInputStream (); 88 String _id = $ex.getId (); 89 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 90 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 91 else if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 92 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 93 else if (_id.equals ("IDL:PortableActivationIDL/ORBAlreadyRegistered:1.0")) 94 throw com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegisteredHelper.read ($in); 95 else 96 throw new org.omg.CORBA.MARSHAL (_id); 97 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 98 registerORB (serverId, orbId, orb, endPointInfo ); 99 } finally { 100 _releaseReply ($in); 101 } 102 } 104 105 109 public org.omg.PortableInterceptor.ObjectReferenceTemplate registerPOA (String serverId, String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate) 110 { 111 org.omg.CORBA.portable.InputStream $in = null; 112 try { 113 org.omg.CORBA.portable.OutputStream $out = _request ("registerPOA", true); 114 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 115 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 116 org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate); 117 $in = _invoke ($out); 118 org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in); 119 return $result; 120 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 121 $in = $ex.getInputStream (); 122 String _id = $ex.getId (); 123 throw new org.omg.CORBA.MARSHAL (_id); 124 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 125 return registerPOA (serverId, orbId, poaTemplate ); 126 } finally { 127 _releaseReply ($in); 128 } 129 } 131 132 134 public void poaDestroyed (String serverId, String orbId, org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate) 135 { 136 org.omg.CORBA.portable.InputStream $in = null; 137 try { 138 org.omg.CORBA.portable.OutputStream $out = _request ("poaDestroyed", true); 139 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 140 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 141 org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write ($out, poaTemplate); 142 $in = _invoke ($out); 143 return; 144 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 145 $in = $ex.getInputStream (); 146 String _id = $ex.getId (); 147 throw new org.omg.CORBA.MARSHAL (_id); 148 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 149 poaDestroyed (serverId, orbId, poaTemplate ); 150 } finally { 151 _releaseReply ($in); 152 } 153 } 155 156 159 public void activate (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerAlreadyActive, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 160 { 161 org.omg.CORBA.portable.InputStream $in = null; 162 try { 163 org.omg.CORBA.portable.OutputStream $out = _request ("activate", true); 164 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 165 $in = _invoke ($out); 166 return; 167 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 168 $in = $ex.getInputStream (); 169 String _id = $ex.getId (); 170 if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyActive:1.0")) 171 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyActiveHelper.read ($in); 172 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 173 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 174 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 175 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 176 else 177 throw new org.omg.CORBA.MARSHAL (_id); 178 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 179 activate (serverId ); 180 } finally { 181 _releaseReply ($in); 182 } 183 } 185 186 188 public void shutdown (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotActive, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 189 { 190 org.omg.CORBA.portable.InputStream $in = null; 191 try { 192 org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", true); 193 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 194 $in = _invoke ($out); 195 return; 196 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 197 $in = $ex.getInputStream (); 198 String _id = $ex.getId (); 199 if (_id.equals ("IDL:PortableActivationIDL/ServerNotActive:1.0")) 200 throw com.sun.corba.se.PortableActivationIDL.ServerNotActiveHelper.read ($in); 201 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 202 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 203 else 204 throw new org.omg.CORBA.MARSHAL (_id); 205 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 206 shutdown (serverId ); 207 } finally { 208 _releaseReply ($in); 209 } 210 } 212 213 216 public void install (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown, com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalled 217 { 218 org.omg.CORBA.portable.InputStream $in = null; 219 try { 220 org.omg.CORBA.portable.OutputStream $out = _request ("install", true); 221 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 222 $in = _invoke ($out); 223 return; 224 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 225 $in = $ex.getInputStream (); 226 String _id = $ex.getId (); 227 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 228 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 229 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 230 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 231 else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyInstalled:1.0")) 232 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyInstalledHelper.read ($in); 233 else 234 throw new org.omg.CORBA.MARSHAL (_id); 235 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 236 install (serverId ); 237 } finally { 238 _releaseReply ($in); 239 } 240 } 242 243 247 public void uninstall (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown, com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalled 248 { 249 org.omg.CORBA.portable.InputStream $in = null; 250 try { 251 org.omg.CORBA.portable.OutputStream $out = _request ("uninstall", true); 252 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 253 $in = _invoke ($out); 254 return; 255 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 256 $in = $ex.getInputStream (); 257 String _id = $ex.getId (); 258 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 259 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 260 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 261 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 262 else if (_id.equals ("IDL:PortableActivationIDL/ServerAlreadyUninstalled:1.0")) 263 throw com.sun.corba.se.PortableActivationIDL.ServerAlreadyUninstalledHelper.read ($in); 264 else 265 throw new org.omg.CORBA.MARSHAL (_id); 266 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 267 uninstall (serverId ); 268 } finally { 269 _releaseReply ($in); 270 } 271 } 273 274 276 public String [] getActiveServers () 277 { 278 org.omg.CORBA.portable.InputStream $in = null; 279 try { 280 org.omg.CORBA.portable.OutputStream $out = _request ("getActiveServers", true); 281 $in = _invoke ($out); 282 String $result[] = com.sun.corba.se.PortableActivationIDL.ServerIdsHelper.read ($in); 283 return $result; 284 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 285 $in = $ex.getInputStream (); 286 String _id = $ex.getId (); 287 throw new org.omg.CORBA.MARSHAL (_id); 288 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 289 return getActiveServers ( ); 290 } finally { 291 _releaseReply ($in); 292 } 293 } 295 296 298 public String [] getORBNames (String serverId) throws com.sun.corba.se.PortableActivationIDL.ServerNotRegistered 299 { 300 org.omg.CORBA.portable.InputStream $in = null; 301 try { 302 org.omg.CORBA.portable.OutputStream $out = _request ("getORBNames", true); 303 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 304 $in = _invoke ($out); 305 String $result[] = com.sun.corba.se.PortableActivationIDL.ORBidListHelper.read ($in); 306 return $result; 307 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 308 $in = $ex.getInputStream (); 309 String _id = $ex.getId (); 310 if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 311 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 312 else 313 throw new org.omg.CORBA.MARSHAL (_id); 314 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 315 return getORBNames (serverId ); 316 } finally { 317 _releaseReply ($in); 318 } 319 } 321 322 325 public org.omg.PortableInterceptor.ObjectReferenceTemplate lookupPOATemplate (String serverId, String orbId, String [] orbAdapterName) 326 { 327 org.omg.CORBA.portable.InputStream $in = null; 328 try { 329 org.omg.CORBA.portable.OutputStream $out = _request ("lookupPOATemplate", true); 330 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 331 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 332 org.omg.PortableInterceptor.AdapterNameHelper.write ($out, orbAdapterName); 333 $in = _invoke ($out); 334 org.omg.PortableInterceptor.ObjectReferenceTemplate $result = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read ($in); 335 return $result; 336 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 337 $in = $ex.getInputStream (); 338 String _id = $ex.getId (); 339 throw new org.omg.CORBA.MARSHAL (_id); 340 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 341 return lookupPOATemplate (serverId, orbId, orbAdapterName ); 342 } finally { 343 _releaseReply ($in); 344 } 345 } 347 348 352 public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType locateServer (String serverId, String endPoint) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 353 { 354 org.omg.CORBA.portable.InputStream $in = null; 355 try { 356 org.omg.CORBA.portable.OutputStream $out = _request ("locateServer", true); 357 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 358 $out.write_string (endPoint); 359 $in = _invoke ($out); 360 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerType $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerTypeHelper.read ($in); 361 return $result; 362 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 363 $in = $ex.getInputStream (); 364 String _id = $ex.getId (); 365 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 366 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 367 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 368 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 369 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 370 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 371 else 372 throw new org.omg.CORBA.MARSHAL (_id); 373 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 374 return locateServer (serverId, endPoint ); 375 } finally { 376 _releaseReply ($in); 377 } 378 } 380 381 385 public com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB locateServerForORB (String serverId, String orbId) throws com.sun.corba.se.PortableActivationIDL.InvalidORBid, com.sun.corba.se.PortableActivationIDL.ServerNotRegistered, com.sun.corba.se.PortableActivationIDL.ServerHeldDown 386 { 387 org.omg.CORBA.portable.InputStream $in = null; 388 try { 389 org.omg.CORBA.portable.OutputStream $out = _request ("locateServerForORB", true); 390 org.omg.PortableInterceptor.ServerIdHelper.write ($out, serverId); 391 org.omg.PortableInterceptor.ORBIdHelper.write ($out, orbId); 392 $in = _invoke ($out); 393 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB $result = com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.read ($in); 394 return $result; 395 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 396 $in = $ex.getInputStream (); 397 String _id = $ex.getId (); 398 if (_id.equals ("IDL:PortableActivationIDL/InvalidORBid:1.0")) 399 throw com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.read ($in); 400 else if (_id.equals ("IDL:PortableActivationIDL/ServerNotRegistered:1.0")) 401 throw com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.read ($in); 402 else if (_id.equals ("IDL:PortableActivationIDL/ServerHeldDown:1.0")) 403 throw com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.read ($in); 404 else 405 throw new org.omg.CORBA.MARSHAL (_id); 406 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 407 return locateServerForORB (serverId, orbId ); 408 } finally { 409 _releaseReply ($in); 410 } 411 } 413 414 416 public int getEndpoint (String endPointType) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint 417 { 418 org.omg.CORBA.portable.InputStream $in = null; 419 try { 420 org.omg.CORBA.portable.OutputStream $out = _request ("getEndpoint", true); 421 $out.write_string (endPointType); 422 $in = _invoke ($out); 423 int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in); 424 return $result; 425 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 426 $in = $ex.getInputStream (); 427 String _id = $ex.getId (); 428 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 429 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 430 else 431 throw new org.omg.CORBA.MARSHAL (_id); 432 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 433 return getEndpoint (endPointType ); 434 } finally { 435 _releaseReply ($in); 436 } 437 } 439 440 443 public int getServerPortForType (com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORB location, String endPointType) throws com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint 444 { 445 org.omg.CORBA.portable.InputStream $in = null; 446 try { 447 org.omg.CORBA.portable.OutputStream $out = _request ("getServerPortForType", true); 448 com.sun.corba.se.PortableActivationIDL.LocatorPackage.ServerLocationPerORBHelper.write ($out, location); 449 $out.write_string (endPointType); 450 $in = _invoke ($out); 451 int $result = com.sun.corba.se.PortableActivationIDL.TCPPortHelper.read ($in); 452 return $result; 453 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 454 $in = $ex.getInputStream (); 455 String _id = $ex.getId (); 456 if (_id.equals ("IDL:PortableActivationIDL/NoSuchEndPoint:1.0")) 457 throw com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.read ($in); 458 else 459 throw new org.omg.CORBA.MARSHAL (_id); 460 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 461 return getServerPortForType (location, endPointType ); 462 } finally { 463 _releaseReply ($in); 464 } 465 } 467 private static String [] __ids = { 469 "IDL:PortableActivationIDL/ServerManager:1.0", 470 "IDL:PortableActivationIDL/Activator:1.0", 471 "IDL:PortableActivationIDL/Locator:1.0"}; 472 473 public String [] _ids () 474 { 475 return (String [])__ids.clone (); 476 } 477 478 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 479 { 480 String str = s.readUTF (); 481 String [] args = null; 482 java.util.Properties props = null; 483 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 484 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 485 _set_delegate (delegate); 486 } 487 488 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 489 { 490 String [] args = null; 491 java.util.Properties props = null; 492 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 493 s.writeUTF (str); 494 } 495 } | Popular Tags |