Package org.jacorb.orb

Examples of org.jacorb.orb.CDROutputStream


    }

    public static ServiceContext createCodesetContext( CodeSet tcs, CodeSet tcsw )
    {
        // encapsulate context
        final CDROutputStream os = new CDROutputStream();
        try
        {
            os.beginEncapsulatedArray();
            CodeSetContextHelper.write( os, new CodeSetContext( tcs.getId(), tcsw.getId() ));

            return new ServiceContext( TAG_CODE_SETS.value, os.getBufferCopy() );
        }
        finally
        {
            os.close();
        }
    }
View Full Code Here


                BiDirIIOPServiceContext b =
                    new BiDirIIOPServiceContext( points );
                org.omg.CORBA.Any any = orb.create_any();
                BiDirIIOPServiceContextHelper.insert( any, b );

                final CDROutputStream cdr_out = new CDROutputStream(orb);

                try
                {
                    cdr_out.beginEncapsulatedArray();
                    BiDirIIOPServiceContextHelper.write( cdr_out, b );

                    bidir_ctx = new ServiceContext( BI_DIR_IIOP.value,
                            cdr_out.getBufferCopy() );
                }
                finally
                {
                    cdr_out.close();
                }
            }

            ri.add_request_service_context( bidir_ctx, true );
View Full Code Here

        return (PolicyValue[])list.toArray (new PolicyValue[list.size()]);
    }

    private ServiceContext createInvocationPolicies()
    {
        final CDROutputStream out = new CDROutputStream();

        try
        {
            out.beginEncapsulatedArray();
            PolicyValueSeqHelper.write(out, getTimingPolicyValues());
            return new ServiceContext (INVOCATION_POLICIES.value,
                    out.getBufferCopy());
        }
        finally
        {
            out.close();
        }
    }
View Full Code Here

     */
    public static byte[] toCDR(UtcT time)
    {
        // TODO: make this more efficient with mere bit shifting
        byte[] buffer = new byte[25];
        CDROutputStream out = new CDROutputStream(buffer);
        out.beginEncapsulatedArray();
        UtcTHelper.write(out, time);
        return out.getBufferCopy();
    }
View Full Code Here

        return (PolicyValue[])list.toArray (new PolicyValue[list.size()]);
    }

    private ServiceContext createInvocationPolicies()
    {
        final CDROutputStream out = new CDROutputStream();

        try
        {
            out.beginEncapsulatedArray();
            PolicyValueSeqHelper.write(out, getTimingPolicyValues());
            return new ServiceContext (INVOCATION_POLICIES.value,
                    out.getBufferCopy());
        }
        finally
        {
            out.close();
        }
    }
View Full Code Here

        {
            org.omg.CORBA.Any any = orb.create_any();

            // create the output stream for the result

            CDROutputStream _out = ((CDROutputStream)any.create_output_stream());

            // get a copy of the content of this reply
            byte[] result_buf = out.getBody();

            // ... and insert it
            _out.setBuffer( result_buf  );
            // important: set the _out buffer's position to the end of the contents!
            _out.skip( result_buf.length );
            return any;
        }
        return result;
    }
View Full Code Here

     * Creates a ServiceContext for transmitting an exception detail message,
     * as per section 1.15.2 of the Java Mapping.
     */
    public static ServiceContext createExceptionDetailMessage (String message)
    {
        final CDROutputStream out = new CDROutputStream();

        try
        {
            out.beginEncapsulatedArray();
            out.write_wstring(message);
            return new ServiceContext(org.omg.IOP.ExceptionDetailMessage.value,
                    out.getBufferCopy());
        }
        finally
        {
            out.close();
        }
    }
View Full Code Here

        throws ForwardRequest
    {
        byte []result = null;

        // This part is proprietary code to marshal the service context data
        CDROutputStream os = new CDROutputStream ();
        os.write_boolean (true);
        result = os.getBufferCopy();
        os.close();
        // End

        ri.add_request_service_context
            (new ServiceContext (BugJac192Test.svcID, result), true);
    }
View Full Code Here

     */
    public void test_pass_in_string6()
    {
        org.omg.CORBA.ORB myorb = setup.getClientOrb();

        CDROutputStream t1 = new CDROutputStream(myorb);

        t1.write_string(UNI1);

        CDRInputStream t2 = new CDRInputStream (myorb, t1.getBufferCopy());

        String result = t2.read_string();

        if( configuration == 2)
        {
View Full Code Here

{
    private CDROutputStream objectUnderTest;

    protected void doSetUp() throws Exception
    {
        objectUnderTest = new CDROutputStream(orb);
    }
View Full Code Here

TOP

Related Classes of org.jacorb.orb.CDROutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.