Package org.jacorb.orb.iiop

Examples of org.jacorb.orb.iiop.IIOPAddress


   /**
    * Return the correct type of address
    */
   protected ProtocolAddressBase create_address_internal ()
   {
      return new IIOPAddress();
   }
View Full Code Here


    public void establish_components(IORInfo info)
    {
    for (Iterator<IIOPAddress> i = alternateAddresses.iterator(); i.hasNext();)
    {
      IIOPAddress addr = i.next();
      info.add_ior_component_to_profile
      (
        new TaggedComponent
        (
          TAG_ALTERNATE_IIOP_ADDRESS.value,
          addr.toCDR()
        ),
        TAG_INTERNET_IOP.value
      );
    }
    }
View Full Code Here

        {
            is.openEncapsulatedArray();
            String hostname = is.read_string();
            short port = is.read_ushort();

            IIOPAddress result = new IIOPAddress (hostname, port);
            try
            {
               result.configure(((org.jacorb.orb.ORB)orb).getConfiguration ());
            }
            catch( ConfigurationException ce)
            {
               ((org.jacorb.orb.ORB)orb).getConfiguration ().getLogger ("PrintIOR").warn("ConfigurationException", ce );
            }


            out.println("\t\tAddress: " + result.toString ());
        }
        finally
        {
            is.close();
        }
View Full Code Here

        sb.append (((IIOPAddress)profile.getAddress ()).getPort());

        for (Iterator<IIOPAddress> iter = profile.getAlternateAddresses().iterator();
                addAlternates && iter.hasNext() ; )
        {
            IIOPAddress address = iter.next();
            sb.append(",iiop:");
            sb.append (createString (profile.version ()));
            sb.append ("@");
            sb.append (wrapIPv6(address.getOriginalHost()));
            sb.append (":");
            sb.append (address.getPort());
        }

        return sb.toString ();
    }
View Full Code Here

        }
    }

    public void addAlternateAddress(String host, int port)
    {
        IIOPAddressInterceptor.alternateAddresses.add (new IIOPAddress (host, port));
    }
View Full Code Here

        super.configure(config);

        String oaiAddr = config.getAttribute("OAIAddr", "");
        if (oaiAddr.length() > 0)
        {
            localEndpoint = (new IIOPAddress(oaiAddr, -1)).getConfiguredHost ();
        }

       // Get configured max and min port numbers
        portMin = getPortProperty(config, MIN_PROP);
        portMax = getPortProperty(config, MAX_PROP);
View Full Code Here

        super.configure(config);

        String oaiAddr = config.getAttribute("OAIAddr", "");
        if (oaiAddr.length() > 0)
        {
            localEndpoint = (new IIOPAddress(oaiAddr, -1)).getConfiguredHost ();
        }
    }
View Full Code Here

{
    @Test
    public void testUnresolvableHostname() throws Exception
    {
        final String hostname = "does.not.exist";
        IIOPAddress address = new IIOPAddress(hostname, 2710);

        MockControl configControl = MockControl.createControl(Configuration.class);
        Configuration configMock = (Configuration) configControl.getMock();

        configControl.expectAndReturn(configMock.getLogger("org.jacorb.iiop.address"), TestUtils.getLogger());
        configControl.expectAndReturn(configMock.getAttributeAsBoolean("jacorb.dns.enable", false), true);
        configControl.expectAndReturn(configMock.getAttributeAsBoolean("jacorb.dns.force_lookup", true), true);
        configControl.expectAndReturn(configMock.getAttributeAsBoolean("jacorb.ipv6.hide_zoneid", true), true);
        configControl.expectAndReturn(configMock.getAttributeAsBoolean("jacorb.dns.eager_resolve", true), true);

        configControl.replay();

        address.configure(configMock);

        configControl.verify();

        assertEquals(address, address);
        assertEquals(address.hashCode(), address.hashCode());
    }
View Full Code Here

      row.addElement (last.id);
      row.addElement (last.kind);
      row.addElement (pior.getTypeId ());
      IIOPProfile p = (IIOPProfile)pior.getEffectiveProfile ();
      final IIOPAddress iiopAddress = (IIOPAddress)p.getAddress ();
      row.addElement (iiopAddress.getIP ());
      row.addElement (Integer.toString (iiopAddress.getPort ()));
      return row;
   }
View Full Code Here

    {
        if( info == null )
        {
            info = reg.get_imr_info();
        }
        return new IIOPAddress (info.host, info.port);
    }
View Full Code Here

TOP

Related Classes of org.jacorb.orb.iiop.IIOPAddress

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.