Examples of IIOPProfile


Examples of org.jacorb.orb.iiop.IIOPProfile

       {
           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;
              }
               cnt--;
               continue;
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPProfile

                }
            }
        }

        // patch the primary address if SSL (or TLS) is required by the target.
        IIOPProfile iiopProfile = findIIOPProfile(profiles);
        if (iiopProfile != null)
        {
            TaggedComponentList components =
                (TaggedComponentList)componentMap.get(ObjectUtil.newInteger(TAG_INTERNET_IOP.value));
            if(this.isSSLRequiredInComponentList(components))
            {
                iiopProfile.patchPrimaryAddress(new IIOPAddress(null, 0));
            }
        }

        // add GIOP 1.0 profile if necessary
        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(ObjectUtil.newInteger(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

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

Examples of org.jacorb.orb.iiop.IIOPProfile

            if (profileTag == TAG_INTERNET_IOP.value &&
                profile instanceof IIOPProfile)
            {
                // Special case check for IIOP profile supporting SSL
                IIOPProfile iiopProfile = (IIOPProfile) profile;
                if
                (
                    (tagToMatch == ORBConstants.JAC_SSL_PROFILE_ID) &&
                    (iiopProfile.getSSL () != null)
                )
                {
                    return profile;
                }

                // Special case check for IIOP profile not supporting SSL
                if
                (
                    (tagToMatch == ORBConstants.JAC_NOSSL_PROFILE_ID) &&
                    ((iiopProfile.getSSL () == null) ||
                     // SSL port contains a valid value but further check is required
                     // see if protection is enabled.
                     (((iiopProfile.getSSL()).target_requires &
                       org.omg.Security.NoProtection.value) != 0))
                )
                {
                    return profile;
                }
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPProfile

                }
            }
        }

        // patch the primary address if SSL (or TLS) is required by the target.
        IIOPProfile iiopProfile = findIIOPProfile(profiles);
        if (iiopProfile != null)
        {
            TaggedComponentList components =
                (TaggedComponentList)componentMap.get(ObjectUtil.newInteger(TAG_INTERNET_IOP.value));
            if(this.isSSLRequiredInComponentList(components))
            {
                iiopProfile.patchPrimaryAddress(new IIOPAddress(null, 0));
            }
        }

        // add GIOP 1.0 profile if necessary
        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(ObjectUtil.newInteger(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

Examples of org.jacorb.orb.iiop.IIOPProfile

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

Examples of org.jacorb.orb.iiop.IIOPProfile

    public int getPort()
    {
        IIOPListener l = getIIOPListener();
        if (l != null)
        {
            IIOPProfile profile = (IIOPProfile)l.endpoint();
            return ((IIOPAddress)profile.getAddress()).getPort();
        }

        throw new RuntimeException("Cannot find server port for non-IIOP transport");
    }
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPProfile

    public String getAddress()
    {
        IIOPListener l = getIIOPListener();
        if (l != null)
        {
            IIOPProfile profile = (IIOPProfile)l.endpoint();
            return ((IIOPAddress)profile.getAddress()).getHostname();
        }

        throw new RuntimeException("Cannot find server address for non-IIOP transport");
    }
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPProfile

        out.println("TAG_INTERNET_IOP Profiles:");
        for( int i = 0; i < profiles.size(); i++ )
        {
            out.println("\tProfile Id:\t\t" + i);

            IIOPProfile profile = (IIOPProfile)profiles.get(i);
            out.println("\tIIOP Version:\t\t" +
                               (int)profile.version().major + "." +
                               (int)profile.version().minor);

            out.println("\tHost:\t\t\t" +
                               ((IIOPAddress)profile.getAddress()).getOriginalHost());
            int port = ((IIOPAddress)profile.getAddress()).getPort();
            if( port < 0 )
            {
                port += 65536;
            }

            out.println("\tPort:\t\t\t" + port );
            out.println("\tObject key (URL):\t" + CorbaLoc.parseKey( profile.get_object_key()));
            out.print  ("\tObject key (hex):\t0x" );
            dumpHex( profile.get_object_key(), out);
            out.println();

            if ( profile.version().minor >= ( char ) 1 )
            {
                if( profile.getComponents().size() > 0 )
                {
                    out.println("\t-- Found " +
                                       profile.getComponents().size() +
                                       " Tagged Components--" );
                }

                printTaggedComponents( profile.getComponents().asArray(), out);
            }
            out.print("\n");
        }

        TaggedComponentList multiple_components = pior.getMultipleComponents();
View Full Code Here

Examples of org.jacorb.orb.iiop.IIOPProfile

            throw new org.omg.CORBA.BAD_PARAM
                ("wrong profile for DIOP transport, tag: "
                 + tagged_profile.value.tag);
        }

        IIOPProfile result = new IIOPProfile(tagged_profile.value.profile_data);
        components.value = result.getComponents().asArray();
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.