Java Code Examples for org.omg.CORBA.Any#insert_Value()
The following examples show how to use
org.omg.CORBA.Any#insert_Value() .
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 File: Util.java From jdk1.8-source-analysis with 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 File: Util.java From TencentKona-8 with 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 File: Util.java From jdk8u60 with 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 File: Util.java From JDKSourceCode1.8 with 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 File: Util.java From openjdk-jdk8u with 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 File: Util.java From openjdk-jdk8u-backup with 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 File: Util.java From openjdk-jdk9 with 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 File: Util.java From hottub with 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 File: Util.java From openjdk-8-source with 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 File: Util.java From openjdk-8 with 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); }