Package org.jacorb.orb.iiop

Examples of org.jacorb.orb.iiop.IIOPAddress



    private boolean checkServerActive(String host, int port, byte []object_key, boolean enp_reused)
    {
        ClientConnectionManager   cm           = null;
        IIOPAddress               address      = null;
        ClientConnection          connection   = null;
        LocateRequestOutputStream lros         = null;
        LocateReplyReceiver       receiver     = null;
        LocateReplyInputStream    lris         = null;
        boolean                   result       = false;

        cm = ((org.jacorb.orb.ORB)orb).getClientConnectionManager ();
        try
        {
            address = new IIOPAddress (host, port);
            address.configure(configuration);

            IIOPProfile iiopProfile = new IIOPProfile(address, object_key, ((org.jacorb.orb.ORB)orb).getGIOPMinorVersion());
            iiopProfile.configure(configuration);

            connection = cm.getConnection(iiopProfile);
View Full Code Here


                                       isLocateRequest,
                                       logger);

            // The typecode is for org.omg.CORBA.Object, but avoiding
            // creation of new ObjectHolder Instance.
            IIOPAddress addr = new IIOPAddress (_poa.host,(short)_poa.port);
            org.omg.IOP.IOR _ior = null;
            try
            {
                addr.configure(configuration);
                IIOPProfile p = new IIOPProfile (addr,object_key,giop_minor);
                p.configure(configuration);
                _ior = ParsedIOR.createObjectIOR ((ORB)orb, p);
            }
            catch(ConfigurationException e)
View Full Code Here

       try
       {
          // now add alternate addresses to primary profile
           for (Iterator<IIOPAddress> i = alternateAddresses.iterator(); i.hasNext();) {

             IIOPAddress addr = i.next();
             primaryProf.addComponent( TAG_ALTERNATE_IIOP_ADDRESS.value, addr.toCDR() );
          }

           // now add a secondary and third profile like used e.g. by
           // Visibroker 4.5
          for (Iterator<IIOPAddress> i = alternateAddresses.iterator(); i.hasNext();)
          {
              IIOPAddress addr = i.next();

              IIOPProfile additionalProfile =
                  (IIOPProfile) primaryProf.clone();

              additionalProfile.patchPrimaryAddress(addr);
View Full Code Here


    @Before
    public void setUp() throws Exception
    {
        iiopProfile = new IIOPProfile( new IIOPAddress( "localhost", 4000 ),
                                       null,
                                       getORB().getGIOPMinorVersion());
    }
View Full Code Here

            try
            {
                myChannel = SocketChannel.open();
                myChannel.configureBlocking(false);

                IIOPAddress address = (IIOPAddress)addressIterator.next();

                final String ipAddress = address.getIP();
                final int port = address.getPort();
                if (ipAddress.indexOf(':') == -1)
                {
                    connection_info = ipAddress + ":" + port;
                }
                else
View Full Code Here

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

                patchAddress((ProfileBase)profile, repId, _transient);

                // patch primary address port to 0 if SSL is required
                if (poa.isSSLRequired())
                {
                    ((ProfileBase)profile).patchPrimaryAddress(new IIOPAddress(null, 0));
                }
            }
        }

        TaggedComponentList multipleComponents = new TaggedComponentList();
        componentMap.put(Integer.valueOf(TAG_MULTIPLE_COMPONENTS.value),
                         multipleComponents);

        // invoke IOR interceptors
        if ((interceptor_manager != null) &&
                interceptor_manager.hasIORInterceptors())
        {
            IORInfoImpl info = new IORInfoImpl(this,
                                               poa,
                                               componentMap,
                                               policy_overrides,
                                               profiles);
            try
            {
                interceptor_manager.getIORIterator().iterate( info );
            }
            catch (Exception e)
            {
                if (logger.isErrorEnabled())
                {
                    logger.error(e.getMessage());
                }
            }
        }

        // add GIOP 1.0 profile if necessary

        IIOPProfile iiopProfile = findIIOPProfile(profiles);
        if ( (iiopProfile != null)
                && ( this.giopMinorVersion == 0 || this.giopAdd_1_0_Profiles ))
        {
            Profile profile_1_0 = iiopProfile.to_GIOP_1_0();
            profiles.add(profile_1_0);

            // shuffle all components over into the multiple components profile
            TaggedComponentList iiopComponents =
                componentMap.get(Integer.valueOf(TAG_INTERNET_IOP.value));

            multipleComponents.addAll(iiopProfile.getComponents());
            multipleComponents.addAll(iiopComponents);

            // if we only want GIOP 1.0, remove the other profile
            if (giopMinorVersion == 0)
            {
                profiles.remove(iiopProfile);
            }
        }
        if (iiopProfile != null)
        {
            TaggedComponentList components =
                componentMap.get(Integer.valueOf(TAG_INTERNET_IOP.value));

            // patch primary address port to 0 if SSL is required
            if (isSSLRequiredInComponentList(components))
            {
                iiopProfile.patchPrimaryAddress(new IIOPAddress(null, 0));
            }
        }

        // marshal the profiles into the IOR and return
        TaggedProfile[] tps = null;
View Full Code Here

                    // to the alternate endpoint list as well
                    if (cnt++ != 0)
                    {
                        try
                        {
                            IIOPAddress address =
                                new IIOPAddress(
                                    ((IIOPAddress) p.getAddress()).getOriginalHost(),
                                    ((IIOPAddress) p.getAddress()).getPort()
                                               );
                            address.configure(configuration);
                            list.addComponent (TAG_ALTERNATE_IIOP_ADDRESS.value,
                                               address.toCDR());
                        }
                        catch (org.jacorb.config.ConfigurationException e)
                        {
                            logger.warn(
                                "patchTagAlternateIIOPAddresses: got an exception, "
                                + e.getMessage());
                        }
                    }

                    List<IIOPAddress> addrList = p.getAlternateAddresses();
                    if (addrList == null)
                    {
                        continue;
                    }

                    for (Iterator<IIOPAddress> iter2 = addrList.iterator(); iter2.hasNext();)
                    {
                        IIOPAddress imrAddr = iter2.next();
                        if (imrAddr == null)
                        {
                            continue;
                        }

                        try
                        {
                            IIOPAddress address =
                            new IIOPAddress(imrAddr.getOriginalHost(),
                                            imrAddr.getPort());

                            address.configure(configuration);
                            list.addComponent (TAG_ALTERNATE_IIOP_ADDRESS.value,
                                               address.toCDR());
                        }
                        catch (org.jacorb.config.ConfigurationException e)
                        {
                            logger.warn(
                                "patchTagAlternateIIOPAddresses: got an exception, "
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.