Package org.jacorb.orb

Examples of org.jacorb.orb.ParsedIOR


                // OBJECT_NOT_EXIST exceptions which they might get
                // when trying to contact the server too early.

                org.omg.CORBA.Object _object =
                    orb.string_to_object(
                        (new ParsedIOR( (org.jacorb.orb.ORB) orb, _ior)).getIORString());

                // Sort of busy waiting here, no other way possible
                for( int _i = 0; _i < object_activation_retries; _i++ )
                {
                    try
View Full Code Here


     * Verifies that the connection defaults to the appropriate codesets if speaking giop 1.0, which does not
     * support negotiation.
     */
    public void testDefaultCodeSets() throws Exception
    {
        ParsedIOR ior = new ParsedIOR( (ORB) orb, new IOR( "", new TaggedProfile[0] ) );
        ClientConnection connection = createClientConnection( 1, 0, ior );

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

     * Verifies that the connection defaults to the appropriate codesets if speaking giop 1.1, when the server
     * fails to offer any code sets.
     */
    public void testNoCodeSetSpecified() throws Exception
    {
        ParsedIOR ior = new ParsedIOR( (ORB) orb, new IOR( "", new TaggedProfile[0] ) );

        ClientConnection connection = createClientConnection( 1, 1, ior );

        assertEquals( "Default codeSet", CodeSet.getTCSDefault().getId(), connection.getTCS().getId() );
        assertEquals( "Default wide codeset", UTF16_ID, connection.getTCSW().getId() );
View Full Code Here

    /**
     * Verifies that the connection can select the supported codesets in GIOP 1.1.
     */
    public void testSelectingStandardCodeSetsFor1_1() throws Exception
    {
        ParsedIOR ior = createParsedIOR( ISO8859_1_ID, UTF16_ID );
        ClientConnection connection = createClientConnection( 1, 1, ior );

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

    /**
     * Verifies that the connection can select UTF8 for wchar in GIOP 1.2.
     */
    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.
     */
    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.
     */
    public void testRejectingUnknownCodeSet() throws Exception
    {
        ParsedIOR ior = createParsedIOR( ISO8859_1_ID, 0x111111 );
        try
        {
            createClientConnection( 1, 2, ior );
            fail( "Should have rejected unknown codeset 0x111111" );
        } catch (CODESET_INCOMPATIBLE e)
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] ) )
        {
            public CodeSetComponentInfo getCodeSetComponentInfo()
            {
                return new CodeSetComponentInfo( forCharData, forWCharData );
            }
View Full Code Here

       // try to get ORB delegate to object
       org.jacorb.orb.Delegate jacOrbDelegate = null;
       Delegate localObj = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate();
       jacOrbDelegate = (org.jacorb.orb.Delegate)localObj;

       ParsedIOR pior = jacOrbDelegate.getParsedIOR();
       org.omg.IOP.IOR ior = jacOrbDelegate.getIOR();

       TaggedProfile[] profiles = ior.profiles;
       int nrOfIOPProf = 0;
       for (int i = 0; i < profiles.length; i++)
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(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.