Package org.jacorb.orb

Examples of org.jacorb.orb.ParsedIOR


     * Verifies that the connection can select UTF8 for wchar in GIOP 1.2.
     */
    @Test
    public void testSelectingUTF8For1_2() throws Exception
    {
        ParsedIOR ior = createParsedIOR( ISO8859_1_ID, UTF8_ID );
        ClientConnection connection = createClientConnection( 1, 2, ior );

        assertEquals( "Selected codeSet",      ISO8859_1_ID, connection.getTCS().getId() );
        assertEquals( "Selected wide codeset", UTF8_ID,      connection.getTCSW().getId() );
    }
View Full Code Here


     * Verifies that the connection can select matching conversion codesets.
     */
    @Test
    public void testSelectingConversionCodeSets() throws Exception
    {
        ParsedIOR ior = createParsedIOR( 0x11111, new int[]{ISO8859_1_ID}, 0x12345, new int[]{UTF16_ID} );
        ClientConnection connection = createClientConnection( 1, 2, ior );

        assertEquals( "Selected codeSet", ISO8859_1_ID, connection.getTCS().getId() );
        assertEquals( "Selected wide codeset", UTF16_ID, connection.getTCSW().getId() );
    }
View Full Code Here

     * Verify that the connection will be rejected if it requires an unknown codeset.
     */
    @Test
    public void testRejectingUnknownCodeSet() throws Exception
    {
        ParsedIOR ior = createParsedIOR( ISO8859_1_ID, 0x111111 );
        try
        {
            createClientConnection( 1, 2, ior );
            fail( "Should have rejected unknown codeset 0x111111" );
        }
View Full Code Here

    private ParsedIOR createParsedIOR( int charCodeSet, int[] conversionCharSets, int wcharCodeSet, int[] conversionWCharSets )
    {
        final CodeSetComponent forCharData = new CodeSetComponent( charCodeSet, conversionCharSets );
        final CodeSetComponent forWCharData = new CodeSetComponent( wcharCodeSet, conversionWCharSets );
        return new ParsedIOR( (ORB) orb, new IOR( "", new TaggedProfile[0] ) )
        {
            @Override
            public CodeSetComponentInfo getCodeSetComponentInfo()
            {
                return new CodeSetComponentInfo( forCharData, forWCharData );
View Full Code Here

    }

    @Test
    public void profileSize()
    {
        ParsedIOR p = new ParsedIOR (setup.getORB(), setup.getServerIOR());

        // If we're not using -ORBListenEndpoints then expect one profile
        assertTrue ("Should be two profiles", p.getProfiles().size() == ( key.startsWith("-") ? 2 : 1));
    }
View Full Code Here

    }

    @Test
    public void interfaceCount()
    {
        ParsedIOR p = new ParsedIOR (setup.getORB(), setup.getServerIOR());
        TaggedComponent[] taggedComponents = ((ProfileBase)p.getEffectiveProfile()).getComponents().asArray();

        int tagCount = 0;
        for (TaggedComponent t : taggedComponents)
        {
            if ( t.tag == TAG_ALTERNATE_IIOP_ADDRESS.value)
View Full Code Here


    @Test
    public void codesetCount()
    {
        ParsedIOR pior = new ParsedIOR (setup.getORB(), setup.getServerIOR());

        int codesetTagCount = 0;

        for (Profile p : pior.getProfiles())
        {
            for (TaggedComponent t : ((ProfileBase)p).getComponents().asArray())
            {
                if ( t.tag == TAG_CODE_SETS.value)
                {
                    codesetTagCount++;
                }
            }
        }

        assertTrue ("Profile count does not having matching TAG_CODE_SETS: " +
        setup.getServerIOR() + " and " + codesetTagCount , codesetTagCount == pior.getProfiles().size());
    }
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, BugJac319AbstractTestCase.IMRIOR);

        totalIncomingObjects++;

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

    {
        TestUtils.getLogger().debug
            ("MutatorImpl::mutateIncoming " + connection.get_server_profile());

        ORB orb = ORB.init(new String[0], null);
        ParsedIOR p = new ParsedIOR ((org.jacorb.orb.ORB)orb, BugPt319Test.IMRIOR);

        totalIncomingObjects++;

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

    private void setImRInfo ()
    {
        try
        {
            org.omg.CORBA.Object ref = this.orb_.resolve_initial_references("ImplRepoService");
            this.pior = new ParsedIOR(this.orb_,
                                    this.orb_.object_to_string (ref));

            this.corbaloc = CorbaLoc.generateCorbalocForMultiIIOPProfiles (this.orb_, ref);
            this.profile = (IIOPProfile) this.pior.getEffectiveProfile();
        }
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.