Package org.jacorb.orb

Examples of org.jacorb.orb.ParsedIOR


        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(orb, orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (props.getProperty("jacorb.implname")) == -1
        );
    }
View Full Code Here


        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb, orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (props.getProperty("jacorb.implname")) != -1
        );
    }
View Full Code Here

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( orb1, orb1.object_to_string(obj));


        // Now create number two.

        final ORB orb2 = newORB(props);

        rootPoa = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPoa.create_POA
        (
                "TestServerPOA",
                rootPoa.the_POAManager(),
                new Policy[]
                           {
                    rootPoa.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPoa.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
        (
                ! (CorbaLoc.parseKey( pior.get_object_key()).equals
                        (CorbaLoc.parseKey( pior2.get_object_key())))
        );
    }
View Full Code Here

     * this we create a ParsedIOR with the known IOR and test that the number
     * of profile bodies is greater than zero.
     */
    public void testDecode1 ()
    {
        final ParsedIOR pior = new ParsedIOR((org.jacorb.orb.ORB) orb, ior);

        List bodies = pior.getProfiles();

        assertNotNull("did not get bodies", bodies);
        assertTrue("did not get bodies", bodies.size() > 0);
    }
View Full Code Here

     * @return an <code>IOR</code> value
     */
    public IOR mutateIncoming (IOR object)
    {
        ORB orb = ORB.init(new String[0], null);
        ParsedIOR ior = new ParsedIOR ((org.jacorb.orb.ORB) orb, BugJac319AbstractTest.IMRIOR);

        totalIncomingObjects++;

        return ior.getIOR();
    }
View Full Code Here

        PrintWriter out = new PrintWriter(System.out, true);

        if( iorString.startsWith( "IOR:" ))
        {
            ParsedIOR pior = new ParsedIOR(jorb, iorString );
            printIOR(pior, out);
        }
        else
        {
            out.println("Sorry, we only unparse IORs in the standard IOR URL scheme");
View Full Code Here

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(getORB(), orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (orbProps.getProperty("jacorb.implname")) == -1
        );
    }
View Full Code Here

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR(getORB(), orb.object_to_string(obj));

        assertTrue
        (
                CorbaLoc.parseKey( pior.get_object_key()).indexOf
                (orbProps.getProperty("jacorb.implname")) != -1
        );
    }
View Full Code Here

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        org.omg.CORBA.Object obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior = new ParsedIOR( getORB(), orb.object_to_string(obj));


        // Now create number two.
        final ORB orb2 = (org.jacorb.orb.ORB)getAnotherORB(orbProps);

        rootPOA = (POAHelper.narrow( orb2.resolve_initial_references( "RootPOA" )));

        // Create a child POA
        poa = rootPOA.create_POA
        (
                "TestServerPOA",
                rootPOA.the_POAManager(),
                new Policy[]
                           {
                    rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT),
                    rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.USER_ID)
                           }
        );

        poa.the_POAManager().activate();

        // create the object reference
        poa.activate_object_with_id("Object".getBytes(), new BasicServerImpl());
        obj = poa.id_to_reference( "Object".getBytes() );

        ParsedIOR pior2 = new ParsedIOR( orb2, orb2.object_to_string(obj));

        assertTrue
        (
                ! (CorbaLoc.parseKey( pior.get_object_key()).equals
                        (CorbaLoc.parseKey( pior2.get_object_key())))
        );
    }
View Full Code Here

        org.omg.CORBA.Object object = testPOA.create_reference_with_id(key, BasicServerHelper.id());

        ObjectImpl objectImpl = (ObjectImpl) object;
        Delegate delegate = (Delegate) objectImpl._get_delegate();

        ParsedIOR parsedIOR = delegate.getParsedIOR();

        StringWriter out = new StringWriter();
        final PrintWriter printWriter = new PrintWriter(out);
        PrintIOR.printIOR(orb, parsedIOR, printWriter);
        printWriter.close();
View Full Code Here

TOP

Related Classes of org.jacorb.orb.ParsedIOR

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.