Package org.omg.CORBA

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


    {
        File target = folder.newFile ("foo");

        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());
        outAny.type ();

        OutputStream s = setup.getClientOrb().create_output_stream ();
        s.write_any (outAny);
View Full Code Here


    public void test_short()
        throws Exception
    {
        short testValue = (short) 4711;
        Any outAny = setup.getClientOrb().create_any();
        outAny.insert_short(testValue);
        assertEquals(testValue, outAny.extract_short());

        Any inAny = server.bounce_any(outAny);

        assertEquals(testValue, inAny.extract_short());
View Full Code Here

    }

    private Object newVarLengthStruct(ClassLoader cl, String m1, boolean alarmMonitoringIndicator, String name, String value, String[] m1Seq) throws Exception
    {
        Any any = org.omg.CORBA.ORB.init().create_any();
        any.insert_short ((short)10);

        Class<?> nameValueClazz = cl.loadClass("org.jacorb.test.bugs.bugjac149.NameAndStringValue_T");
        Constructor<?> nameValueCTOR = nameValueClazz.getConstructor(new Class[] {String.class, String.class});
        Object nameValue = nameValueCTOR.newInstance(new Object[] {name, value});
View Full Code Here

        a.insert_longlong( l );
        System.out.println( s.generic( a ) );

        // short
        System.out.print("Passing a short...");
        a.insert_short( (short)5 );
        System.out.println( s.generic( a ) );

        // float
        System.out.print("Passing a float...");
        a.insert_float( (float)3.14);
View Full Code Here

        Any discardPolicy = setup.getClientOrb().create_any();
        Any orderPolicy = setup.getClientOrb().create_any();

        discardPolicy.insert_short(LifoOrder.value);
        orderPolicy.insert_short(AnyOrder.value);

        props[0] = new Property(DiscardPolicy.value, discardPolicy);
        props[1] = new Property(OrderPolicy.value, orderPolicy);

        ps.set_qos(props);
View Full Code Here

        for (int x = 0; x < events.length; ++x)
        {
            events[x] = new NotificationTestUtils(setup.getClientOrb()).getStructuredEvent();

            Any priority = setup.getClientOrb().create_any();
            priority.insert_short((short) x);

            events[x].header.variable_header = new Property[] { new Property(Priority.value,
                    priority) };

        }
View Full Code Here

    @Test
    public void testValidateQoS() throws Exception
    {
        Property[] _props = new Property[3];
        Any _bestEffortAny = getORB().create_any();
        _bestEffortAny.insert_short(BestEffort.value);
        _props[0] = new Property(ConnectionReliability.value, _bestEffortAny);

        Any _priorityAny = getORB().create_any();
        _priorityAny.insert_short((short) 20);
        _props[1] = new Property(Priority.value, _priorityAny);
View Full Code Here

        Any _bestEffortAny = getORB().create_any();
        _bestEffortAny.insert_short(BestEffort.value);
        _props[0] = new Property(ConnectionReliability.value, _bestEffortAny);

        Any _priorityAny = getORB().create_any();
        _priorityAny.insert_short((short) 20);
        _props[1] = new Property(Priority.value, _priorityAny);

        Any _discardPolicyAny = getORB().create_any();
        _discardPolicyAny.insert_short(FifoOrder.value);
View Full Code Here

        Any _priorityAny = getORB().create_any();
        _priorityAny.insert_short((short) 20);
        _props[1] = new Property(Priority.value, _priorityAny);

        Any _discardPolicyAny = getORB().create_any();
        _discardPolicyAny.insert_short(FifoOrder.value);

        _props[2] = new Property(DiscardPolicy.value, _discardPolicyAny);

        ////////////////////////////////////////
View Full Code Here

    public void establish_components(IORInfo info) {
        try {
            // Invocation Policy = EITHER
            Any any = ORB.init().create_any();
            any.insert_short(EITHER);
            byte[] taggedComponentData = codec.encode_value(any);
            info.add_ior_component(new TaggedComponent(TAG_INV_POLICY, taggedComponentData));
            // OTS Policy = ADAPTS
            any = ORB.init().create_any();
            any.insert_short(ADAPTS);
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.