Java Code Examples for org.omg.CORBA.Any#insert_Object()
The following examples show how to use
org.omg.CORBA.Any#insert_Object() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: jdk1.8-source-analysis File: Util.java License: Apache License 2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 2
Source Project: TencentKona-8 File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 3
Source Project: jdk8u60 File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 4
Source Project: JDKSourceCode1.8 File: Util.java License: MIT License | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 5
Source Project: openjdk-jdk8u File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 6
Source Project: openjdk-jdk8u-backup File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 7
Source Project: openjdk-jdk9 File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 8
Source Project: hottub File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 9
Source Project: openjdk-8-source File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }
Example 10
Source Project: openjdk-8 File: Util.java License: GNU General Public License v2.0 | 5 votes |
/** * Writes any java.lang.Object as a CORBA any. * @param out the stream in which to write the any. * @param obj the object to write as an any. */ public void writeAny( org.omg.CORBA.portable.OutputStream out, java.lang.Object obj) { org.omg.CORBA.ORB orb = out.orb(); // Create Any Any any = orb.create_any(); // Make sure we have a connected object... java.lang.Object newObj = Utility.autoConnect(obj,orb,false); if (newObj instanceof org.omg.CORBA.Object) { any.insert_Object((org.omg.CORBA.Object)newObj); } else { if (newObj == null) { // Handle the null case, including backwards // compatibility issues any.insert_Value(null, createTypeCodeForNull(orb)); } else { if (newObj instanceof Serializable) { // If they're our Any and ORB implementations, // we may want to do type code related versioning. TypeCode tc = createTypeCode((Serializable)newObj, any, orb); if (tc == null) any.insert_Value((Serializable)newObj); else any.insert_Value((Serializable)newObj, tc); } else if (newObj instanceof Remote) { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } else { ORBUtility.throwNotSerializableForCorba(newObj.getClass().getName()); } } } out.write_any(any); }