Package org.jacorb.orb.etf

Examples of org.jacorb.orb.etf.ProtocolAddressBase


        String address_str = configuration.getAttribute("OAAddress",null);
        if (address_str != null)
        {
            // build an iiop/ssliop protocol address.
            // create_protocol_address will allow iiop and ssliop only
            ProtocolAddressBase addr = createProtocolAddress(address_str);
            address = (IIOPAddress)addr;
            address.configure(configuration);
        }
        else
        {
            int oaPort = configuration.getAttributeAsInteger("OAPort",0);
            String oaHost = configuration.getAttribute("OAIAddr","");
            address = new IIOPAddress(oaHost,oaPort);
            address.configure(configuration);
        }

        String ssl_address_str = configuration.getAttribute("OASSLAddress",null);
        if (ssl_address_str != null)
        {
            // build a protocol address
            ProtocolAddressBase ssl_addr = createProtocolAddress(ssl_address_str);
            ssl_address = (IIOPAddress)ssl_addr;
            ssl_address.configure(configuration);

        }
        else
View Full Code Here


                            // create_protocol_address will allow iiop and ssliop only
                            IIOPAddress address = null;
                            IIOPAddress ssl_address = null;
                            if (protocol == Protocol.IIOP)
                            {
                                ProtocolAddressBase addr1 = createProtocolAddress(address_trim);
                                if (addr1 instanceof IIOPAddress)
                                {
                                    address = (IIOPAddress)addr1;
                                    address.configure(configuration);
                                }

                                if (ssl_port != null)
                                {
                                    int colon_delim = address_trim.indexOf(":");
                                    int port_delim = address_trim.indexOf(":", colon_delim+2);
                                    if (port_delim > 0)
                                    {
                                        host_str = address_trim.substring(colon_delim+3, port_delim);
                                    }
                                    else
                                    {
                                        host_str = "";
                                    }

                                    ssl_address = new IIOPAddress(host_str,Integer.parseInt(ssl_port));
                                    ssl_address.configure(configuration);
                                }

                            }
                            else if(protocol == Protocol.SSLIOP)
                            {
                                ProtocolAddressBase addr2 = createProtocolAddress(address_trim);
                                if (addr2 instanceof IIOPAddress)
                                {
                                    ssl_address = (IIOPAddress)addr2;
                                    ssl_address.configure(configuration);
                                }

                                //  Set the protocol to IIOP for using IIOP Protocol Factory
                                protocol = Protocol.IIOP;
                            }
                            else
                            {
                                ProtocolAddressBase addr1 = createProtocolAddress(address_trim);
                                if (addr1 instanceof IIOPAddress)
                                {
                                    address = (IIOPAddress)addr1;
                                    address.configure(configuration);
                                }
View Full Code Here

     * it neither addressString NOR (host AND port) are specified this method
     * will return null.
     */
    private ProtocolAddressBase createAddress(String host, int port, String addressString)
    {
        final ProtocolAddressBase address;

        try
        {
            if (addressString == null)
            {
                if (host != null || port != -1)
                {
                    address = new IIOPAddress ();
                    address.configure(configuration);
                    if (host != null)
                    {
                        ((IIOPAddress)address).setHostname(host);
                    }
                    if (port != -1)
View Full Code Here

    }

    private ProtocolAddressBase createAddress (String address)
    {
        List<Factories> factorylist = getTransportManager().getFactoriesList();
        ProtocolAddressBase result = null;
        for (Iterator<Factories> i = factorylist.iterator();
                i.hasNext() && result == null;)
        {
            FactoriesBase f = (FactoriesBase)i.next();
            result = f.create_protocol_address(address);
View Full Code Here

                if ( imr != null )
                {
                    /* Register the POA */
                    String server_name = implName;
                    ProtocolAddressBase sep = getServerAddress();
                    if (sep instanceof IIOPAddress)
                    {
                        String sep_host = ((IIOPAddress)sep).getHostname();
                        int sep_port = ((IIOPAddress)sep).getPort();

                        imr.registerPOA (server_name + "/" +
                                        poa._getQualifiedName(),
                                        server_name, // logical server name
                                        sep_host, sep_port);
                    }
                }
            }
            else if (useTaoIMR)
            {
                getImR ();

                if ( imr != null )
                {
                    /* Register the POA */
                    ProtocolAddressBase sep = getServerAddress();
                    if (sep instanceof IIOPAddress)
                    {
                        imr.registerPOA (this, poa, sep, implName);
                    }
                }
View Full Code Here

     *
     * @return a <code>String</code>, the address for the server.
     */
    private synchronized ProtocolAddressBase getServerAddress()
    {
        ProtocolAddressBase address = iorProxyAddress;

        if ( address == null )
        {
            //property not set

            List<Profile> eplist = getBasicAdapter().getEndpointProfiles();
            for (Iterator<Profile> i = eplist.iterator(); i.hasNext(); )
            {
                Profile p = i.next();
                if (p instanceof IIOPProfile)
                {
                    address = ((IIOPProfile)p).getAddress();
                    break;
                }
            }
        }
        else
        {
            if (logger.isInfoEnabled())
            {
                logger.info("Using proxy address " +
                            address.toString() +
                            " in IOR" );
            }
        }

        return address;
View Full Code Here

TOP

Related Classes of org.jacorb.orb.etf.ProtocolAddressBase

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.