Package org.jacorb.orb.iiop

Examples of org.jacorb.orb.iiop.IIOPProfile


       if( nrOfProf != 1 )
       {
          throw new RuntimeException ("unexpected number of IOP Profiles: " + nrOfProf);
       }

       IIOPProfile primaryProf =
           (IIOPProfile) infoExt.get_profile(TAG_INTERNET_IOP.value, 0);
       try
       {
          IIOPProfile cloneOfPrimary = (IIOPProfile) primaryProf.clone();

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

             IIOPAddress addr = (IIOPAddress)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 i = alternateAddresses.iterator(); i.hasNext();)
          {
              IIOPAddress addr = (IIOPAddress)i.next();

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

              additionalProfile.patchPrimaryAddress(addr);

              infoExt.add_profile(additionalProfile);
          }
       }
       catch ( CloneNotSupportedException ex )
       {
          throw new RuntimeException ("Exception during cloning of profile: "
                                      + ex);
       }

       nrOfProf = infoExt.get_number_of_profiles(TAG_INTERNET_IOP.value);
       if( nrOfProf != 1 + alternateAddresses.size())
       {
          throw new RuntimeException ("unexpected number of IOP Profiles after addition: "
                                      + nrOfProf
                                      + ", where number of alternates was: "
                                      + alternateAddresses.size());
       }

       // check access functions
       primaryProf =
           (IIOPProfile) infoExt.get_profile(TAG_INTERNET_IOP.value, 0);
       IIOPProfile primaryProf2 =
           (IIOPProfile) infoExt.get_profile(TAG_INTERNET_IOP.value);
       // they should be equal to primary
       if ( ! primaryProf.equals(primaryProf2) )
       {
          throw new RuntimeException ("difference between "
View Full Code Here


       {
           if (profiles[i].tag == TAG_INTERNET_IOP.value)
           {
               if( cnt == 0 )
              {
                  IIOPProfile prof = new IIOPProfile(profiles[i].profile_data);
                  assertEquals(((IIOPAddress)prof.getAddress()).getIP(), host);
                  assertEquals(((IIOPAddress)prof.getAddress()).getPort(), port);
                  found = true;
                  break;
              }
              else
              {
View Full Code Here

            }
        }

        // 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 =
                (TaggedComponentList)componentMap.get(new Integer(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)
            {
View Full Code Here

    public int getPort()
    {
        IIOPListener l = getIIOPListener();
        if (l != null)
        {
            IIOPProfile profile = (IIOPProfile)l.endpoint();
            return ((IIOPAddress)profile.getAddress()).getPort();
        }
        else
        {
            throw new RuntimeException
                ("Cannot find server port for non-IIOP transport");
View Full Code Here

    public int getSSLPort()
    {
        IIOPListener l = getIIOPListener();
        if (l != null)
        {
            IIOPProfile profile = (IIOPProfile)l.endpoint();
            return profile.getSSLPort();
        }
        else
        {
            throw new RuntimeException
                ("Non-IIOP transport does not have an SSL port");
View Full Code Here

    public String getAddress()
    {
        IIOPListener l = getIIOPListener();
        if (l != null)
        {
            IIOPProfile profile = (IIOPProfile)l.endpoint();
            return ((IIOPAddress)profile.getAddress()).getHostname();
        }
        else
        {
            throw new RuntimeException
                ("Cannot find server address for non-IIOP transport");
View Full Code Here

        Profile result = null;
        if (orb == null
            && (colon == 0
                || addr.startsWith("iiop:")
                || addr.startsWith("ssliop:")))
            result = new IIOPProfile(addr);
        else if (orb != null)
        {
            String token = addr.substring(0, colon);
            List factories = orb.getTransportManager().getFactoriesList();
            for (Iterator i = factories.iterator();
View Full Code Here

            if (logger.isDebugEnabled())
            {
                logger.debug("Client conn. added to target " + addr );
            }

            conn_mg.addConnection( connection, new IIOPProfile (addr, null) );
        }
    }
View Full Code Here

        Vector row = new Vector();

    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

        try
        {
            address = new IIOPAddress (host, port);
            address.configure(configuration);

            IIOPProfile iiopProfile = new IIOPProfile(address, object_key);
            iiopProfile.configure(configuration);

            connection = cm.getConnection(iiopProfile);
        }
        catch(ConfigurationException e)
        {
View Full Code Here

TOP

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

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.