Java Code Examples for org.omg.CORBA.portable.InputStream#read_Object()
The following examples show how to use
org.omg.CORBA.portable.InputStream#read_Object() .
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: StubIORImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 2
Source File: BootstrapResolverImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public org.omg.CORBA.Object resolve( String identifier ) { InputStream inStream = null ; org.omg.CORBA.Object result = null ; try { inStream = invoke( "get", identifier ) ; result = inStream.read_Object(); // NOTE: do note trap and ignore errors. // Let them flow out. } finally { bootstrapDelegate.releaseReply( null, inStream ) ; } return result ; }
Example 3
Source File: StubIORImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 4
Source File: StubIORImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 5
Source File: BootstrapResolverImpl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public org.omg.CORBA.Object resolve( String identifier ) { InputStream inStream = null ; org.omg.CORBA.Object result = null ; try { inStream = invoke( "get", identifier ) ; result = inStream.read_Object(); // NOTE: do note trap and ignore errors. // Let them flow out. } finally { bootstrapDelegate.releaseReply( null, inStream ) ; } return result ; }
Example 6
Source File: StubIORImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 7
Source File: StubIORImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 8
Source File: BootstrapResolverImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public org.omg.CORBA.Object resolve( String identifier ) { InputStream inStream = null ; org.omg.CORBA.Object result = null ; try { inStream = invoke( "get", identifier ) ; result = inStream.read_Object(); // NOTE: do note trap and ignore errors. // Let them flow out. } finally { bootstrapDelegate.releaseReply( null, inStream ) ; } return result ; }
Example 9
Source File: StubIORImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 10
Source File: StubIORImpl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Delegate getDelegate( ORB orb ) { // write the IOR components to an org.omg.CORBA.portable.OutputStream OutputStream ostr = orb.create_output_stream(); ostr.write_long(typeData.length); ostr.write_octet_array(typeData, 0, typeData.length); ostr.write_long(profileTags.length); for (int i = 0; i < profileTags.length; i++) { ostr.write_long(profileTags[i]); ostr.write_long(profileData[i].length); ostr.write_octet_array(profileData[i], 0, profileData[i].length); } InputStream istr = ostr.create_input_stream() ; // read the IOR back from the stream org.omg.CORBA.Object obj = (org.omg.CORBA.Object)istr.read_Object(); return StubAdapter.getDelegate( obj ) ; }
Example 11
Source File: Utility.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 12
Source File: Utility.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 13
Source File: Utility.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 14
Source File: Utility.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 15
Source File: Utility.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 16
Source File: CorbaObjectWriterTest.java From cxf with Apache License 2.0 | 5 votes |
@Test public void testWriteObject() throws IOException { URL refUrl = getClass().getResource("/references/account.ref"); String oRef = IOUtils.toString(refUrl.openStream()).trim(); org.omg.CORBA.Object objRef = orb.string_to_object(oRef); assertNotNull(objRef); // create a test object org.apache.cxf.binding.corba.wsdl.Object objectType = new org.apache.cxf.binding.corba.wsdl.Object(); objectType.setRepositoryID("IDL:Account:1.0"); objectType.setBinding(new QName("AccountCORBABinding")); QName objectName = new QName("TestObject"); QName objectIdlType = new QName("corbaatm:TestObject"); TypeCode objectTC = orb.create_interface_tc("IDL:Account:1.0", "TestObject"); CorbaObjectReferenceHandler obj = new CorbaObjectReferenceHandler(objectName, objectIdlType, objectTC, objectType); obj.setReference(objRef); OutputStream oStream = orb.create_output_stream(); CorbaObjectWriter writer = new CorbaObjectWriter(oStream); writer.writeObjectReference(obj); InputStream iStream = oStream.create_input_stream(); org.omg.CORBA.Object resultObj = iStream.read_Object(); assertTrue(resultObj._is_equivalent(obj.getReference())); }
Example 17
Source File: Utility.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Read an object reference from the input stream and narrow * it to the desired type. * @param in the stream to read from. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static Object readObjectAndNarrow(InputStream in, Class narrowTo) throws ClassCastException { Object result = in.read_Object(); if (result != null) return PortableRemoteObject.narrow(result, narrowTo); else return null; }
Example 18
Source File: ObjectHolder.java From hottub with GNU General Public License v2.0 | 2 votes |
/** * Reads from <code>input</code> and initalizes the value in * this <code>ObjectHolder</code> object * with the unmarshalled data. * * @param input the InputStream containing CDR formatted data from the wire. */ public void _read(InputStream input) { value = input.read_Object(); }
Example 19
Source File: ObjectHolder.java From TencentKona-8 with GNU General Public License v2.0 | 2 votes |
/** * Reads from <code>input</code> and initalizes the value in * this <code>ObjectHolder</code> object * with the unmarshalled data. * * @param input the InputStream containing CDR formatted data from the wire. */ public void _read(InputStream input) { value = input.read_Object(); }
Example 20
Source File: ObjectHolder.java From jdk1.8-source-analysis with Apache License 2.0 | 2 votes |
/** * Reads from <code>input</code> and initalizes the value in * this <code>ObjectHolder</code> object * with the unmarshalled data. * * @param input the InputStream containing CDR formatted data from the wire. */ public void _read(InputStream input) { value = input.read_Object(); }