Package org.omg.CORBA

Examples of org.omg.CORBA.Any.extract_Object()


        case TCKind._tk_string:
            return any.extract_string();

        case TCKind._tk_objref:
            org.omg.CORBA.Object ref = any.extract_Object();
            return ref;

        case TCKind._tk_any:
            return any.extract_any();
View Full Code Here


     */
    public Object readAny(InputStream in)
    {
        Any any = in.read_any();
        if ( any.type().kind().value() == TCKind._tk_objref )
            return any.extract_Object ();
        else
            return any.extract_Value();
    }

    /**
 
View Full Code Here

        case TCKind._tk_string:
            return any.extract_string();

        case TCKind._tk_objref:
            org.omg.CORBA.Object ref = any.extract_Object();
            return ref;

        case TCKind._tk_any:
            return any.extract_any();
View Full Code Here

     */
    public Object readAny(InputStream in)
    {
        Any any = in.read_any();
        if ( any.type().kind().value() == TCKind._tk_objref )
            return any.extract_Object ();
        else
            return any.extract_Value();
    }

    /**
 
View Full Code Here

    public void test_object()
        throws Exception
    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Object(server);
        assertEquals(server, outAny.extract_Object());

        Any inAny = server.bounce_any(outAny);

        //can't readily test equality of object references
        assertTrue(outAny.equal(inAny));
View Full Code Here

    public void test_object_streamable()
        throws Exception
    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Streamable(new AnyServerHolder(server));
        assertEquals(server, outAny.extract_Object());

        Any inAny = server.bounce_any(outAny);

        //can't readily test equality of object references
        assertTrue(outAny.equal(inAny));
View Full Code Here

    public void test_object2()
        throws Exception
    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Object(server, AnyServerHelper.type());
        assertEquals(server, outAny.extract_Object());

        Any inAny = server.bounce_any(outAny);

        //can't readily test equality of object references
        assertTrue(outAny.equal(inAny));
View Full Code Here

    public void test_object_null()
        throws Exception
    {
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_Object(null);
        assertNull(outAny.extract_Object());

        Any inAny = server.bounce_any(outAny);

        assertTrue(outAny.equal(inAny));
        assertNull(inAny.extract_Object());
View Full Code Here

        assertNull(outAny.extract_Object());

        Any inAny = server.bounce_any(outAny);

        assertTrue(outAny.equal(inAny));
        assertNull(inAny.extract_Object());
    }

    public void test_object_stream()
    {
        Any any = setup.getClientOrb().create_any();
View Full Code Here

            "AnyServer"
        ));
        any.create_output_stream().write_Object (server);
        // don't bounce, because we want to extract from the
        // output stream we just created
        org.omg.CORBA.Object outValue = any.extract_Object();
        assertTrue (outValue._is_a("IDL:org/jacorb/test/orb/AnyServer:1.0"));
    }

    public void test_TypeCode()
        throws Exception
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.