436 else |
436 else |
437 return any.extract_Value(); |
437 return any.extract_Value(); |
438 } |
438 } |
439 |
439 |
440 /** |
440 /** |
441 * Writes a java.lang.Object as a CORBA Object. If <code>obj</code> is |
441 * Writes a java.lang.Object as a CORBA Object. If {@code obj} is |
442 * an exported RMI-IIOP server object, the tie is found |
442 * an exported RMI-IIOP server object, the tie is found |
443 * and wired to <code>obj</code>, then written to <code>out.write_Object(org.omg.CORBA.Object)</code>. |
443 * and wired to {@code obj}, then written to {@code out.write_Object(org.omg.CORBA.Object)}. |
444 * If <code>obj</code> is a CORBA Object, it is written to |
444 * If {@code obj} is a CORBA Object, it is written to |
445 * <code>out.write_Object(org.omg.CORBA.Object)</code>. |
445 * {@code out.write_Object(org.omg.CORBA.Object)}. |
446 * @param out the stream in which to write the object. |
446 * @param out the stream in which to write the object. |
447 * @param obj the object to write. |
447 * @param obj the object to write. |
448 */ |
448 */ |
449 public void writeRemoteObject(OutputStream out, java.lang.Object obj) |
449 public void writeRemoteObject(OutputStream out, java.lang.Object obj) |
450 { |
450 { |
455 out.write_Object((org.omg.CORBA.Object)newObj); |
455 out.write_Object((org.omg.CORBA.Object)newObj); |
456 } |
456 } |
457 |
457 |
458 /** |
458 /** |
459 * Writes a java.lang.Object as either a value or a CORBA Object. |
459 * Writes a java.lang.Object as either a value or a CORBA Object. |
460 * If <code>obj</code> is a value object or a stub object, it is written to |
460 * If {@code obj} is a value object or a stub object, it is written to |
461 * <code>out.write_abstract_interface(java.lang.Object)</code>. If <code>obj</code> is an exported |
461 * {@code out.write_abstract_interface(java.lang.Object)}. If {@code obj} is an exported |
462 * RMI-IIOP server object, the tie is found and wired to <code>obj</code>, |
462 * RMI-IIOP server object, the tie is found and wired to {@code obj}, |
463 * then written to <code>out.write_abstract_interface(java.lang.Object)</code>. |
463 * then written to {@code out.write_abstract_interface(java.lang.Object)}. |
464 * @param out the stream in which to write the object. |
464 * @param out the stream in which to write the object. |
465 * @param obj the object to write. |
465 * @param obj the object to write. |
466 */ |
466 */ |
467 public void writeAbstractObject( OutputStream out, java.lang.Object obj ) |
467 public void writeAbstractObject( OutputStream out, java.lang.Object obj ) |
468 { |
468 { |
593 * @param className the name of the class. |
593 * @param className the name of the class. |
594 * @param remoteCodebase a space-separated list of URLs at which |
594 * @param remoteCodebase a space-separated list of URLs at which |
595 * the class might be found. May be null. |
595 * the class might be found. May be null. |
596 * @param loader a class whose ClassLoader may be used to |
596 * @param loader a class whose ClassLoader may be used to |
597 * load the class if all other methods fail. |
597 * load the class if all other methods fail. |
598 * @return the <code>Class</code> object representing the loaded class. |
598 * @return the {@code Class} object representing the loaded class. |
599 * @exception ClassNotFoundException if class cannot be loaded. |
599 * @exception ClassNotFoundException if class cannot be loaded. |
600 */ |
600 */ |
601 public Class loadClass( String className, String remoteCodebase, |
601 public Class loadClass( String className, String remoteCodebase, |
602 ClassLoader loader) throws ClassNotFoundException |
602 ClassLoader loader) throws ClassNotFoundException |
603 { |
603 { |
604 return JDKBridge.loadClass(className,remoteCodebase,loader); |
604 return JDKBridge.loadClass(className,remoteCodebase,loader); |
605 } |
605 } |
606 |
606 |
607 /** |
607 /** |
608 * The <tt>isLocal</tt> method has the same semantics as the |
608 * The {@code isLocal} method has the same semantics as the |
609 * ObjectImpl._is_local method, except that it can throw a RemoteException. |
609 * ObjectImpl._is_local method, except that it can throw a RemoteException. |
610 * (no it doesn't but the spec says it should.) |
610 * (no it doesn't but the spec says it should.) |
611 * |
611 * |
612 * The <tt>_is_local()</tt> method is provided so that stubs may determine |
612 * The {@code _is_local()} method is provided so that stubs may determine |
613 * if a particular object is implemented by a local servant and hence local |
613 * if a particular object is implemented by a local servant and hence local |
614 * invocation APIs may be used. |
614 * invocation APIs may be used. |
615 * |
615 * |
616 * @param stub the stub to test. |
616 * @param stub the stub to test. |
617 * |
617 * |
618 * @return The <tt>_is_local()</tt> method returns true if |
618 * @return The {@code _is_local()} method returns true if |
619 * the servant incarnating the object is located in the same process as |
619 * the servant incarnating the object is located in the same process as |
620 * the stub and they both share the same ORB instance. The <tt>_is_local()</tt> |
620 * the stub and they both share the same ORB instance. The {@code _is_local()} |
621 * method returns false otherwise. The default behavior of <tt>_is_local()</tt> is |
621 * method returns false otherwise. The default behavior of {@code _is_local()} is |
622 * to return false. |
622 * to return false. |
623 * |
623 * |
624 * @throws RemoteException The Java to IDL specification does to |
624 * @throws RemoteException The Java to IDL specification does to |
625 * specify the conditions that cause a RemoteException to be thrown. |
625 * specify the conditions that cause a RemoteException to be thrown. |
626 */ |
626 */ |