Examples of IIOPProfileTemplate


Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

     * @param the IOR.
     * @return the array of compound security mechanisms.
     */
    public CompoundSecMech[] getSecurityMechanisms(IOR ior) {
  IIOPProfile prof = ior.getProfile();
  IIOPProfileTemplate ptemp = (IIOPProfileTemplate)prof.
           getTaggedProfileTemplate();
  Iterator<TaggedComponent> itr = ptemp.iteratorById(
      TAG_CSI_SEC_MECH_LIST.value);

  if(!itr.hasNext()) {
            if(_logger.isLoggable(Level.FINE)){
                String msg = "IIOP:TAG_CSI_SEC_MECH_LIST tagged component not found";
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

        try {
      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg + ".extract->:");
      }
            SecurityMechanismSelector selector = new SecurityMechanismSelector();
            IIOPProfileTemplate iiopProfileTemplate = (IIOPProfileTemplate)ior.
                                 getProfile().getTaggedProfileTemplate();
            IIOPAddress primary = iiopProfileTemplate.getPrimaryAddress() ;
            String host = primary.getHost().toLowerCase();

            ConnectionContext ctx = new ConnectionContext();
            socketInfo = selector.getSSLPorts(ior, ctx);
            selector.setClientConnectionContext(ctx);
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg + ".getSocketInfo->:");
      }
            List result = new ArrayList();
            SecurityMechanismSelector selector = new SecurityMechanismSelector();
            IIOPProfileTemplate iiopProfileTemplate = (IIOPProfileTemplate)ior.
                                 getProfile().getTaggedProfileTemplate();
            IIOPAddress primary = iiopProfileTemplate.getPrimaryAddress() ;
            String host = primary.getHost().toLowerCase();

            String type = null;
            int port = 0;
            ConnectionContext ctx = new ConnectionContext();
            SocketInfo socketInfo = selector.getSSLPort(ior, ctx);
            selector.setClientConnectionContext(ctx);
            if (socketInfo == null) {
                type = SocketInfo.IIOP_CLEAR_TEXT;
                port = primary.getPort();
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: did not find SSL SocketInfo");
    }
            } else {
                type = socketInfo.getType();
                port = socketInfo.getPort();
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: found SSL socketInfo");
    }
            }
       
      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: Connection Context:" + ctx);
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: ENDPOINT INFO:type=" + type + ",host=" +host + ", port=" + port);
      }

            // for SSL
            if (socketInfo != null ) {
                result.add(socketInfo);
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: returning SSL socketInfo:"
        + " " + socketInfo.getType()
        + " " + socketInfo.getHost()
        + " " + socketInfo.getPort());
    }
    // REVISIT: should call IIOPPrimaryToContactInfo.reset
    // right here to invalidate sticky for this result.
    // However, SSL and IIOP-FO is not a supported feature.
                return result;
            }

      ////////////////////////////////////////////////////
      //
      // The remainder of this code is non-SSL.
      // Author: Harold Carr
      // Please contact author is changes needed.
      //

            // for non-SSL
      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: returning non SSL socketInfo");
      }

      if (! previous.isEmpty()) {
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: returning previous socketInfo: "
        + previous);
    }
    return previous;
      }

      //
      // Save and add primary address
      //

      SocketInfo primarySocketInfo =
    createSocketInfo("primary", type, host, port);
      result.add(primarySocketInfo);

      //
      // List alternate addresses.
      //

      Iterator iterator = iiopProfileTemplate.iteratorById(
          org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS.value
    );

      while (iterator.hasNext()) {
    AlternateIIOPAddressComponent alternate =
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

    }

    public SocketInfo getEndPointInfo(ORB orb, IOR ior,
                    SocketInfo endPointInfo) {
        try {
            IIOPProfileTemplate temp = (IIOPProfileTemplate)ior.
                     getProfile().getTaggedProfileTemplate();
            IIOPAddress primary = temp.getPrimaryAddress() ;
            String host = primary.getHost().toLowerCase();
            int port = primary.getPort();
     
      if(_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,"ENDPOINT INFO:host=" +host + ", port=" + port);
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

        }

        if (ssl == null) {
            if (sslRequired) {
                // Attempt to create SSL connection to host, ORBInitialPort
                IIOPProfileTemplate templ = (IIOPProfileTemplate)
                    ior.getProfile().getTaggedProfileTemplate();
                IIOPAddress addr = templ.getPrimaryAddress();
                info = IORToSocketInfoImpl.createSocketInfo(
            "SecurityMechanismSelector1",
                        "SSL", addr.getHost(), ORBManager.getORBInitialPort());
                return info;
            } else {
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

        }

        if (ssl == null) {
            if (sslRequired) {
                // Attempt to create SSL connection to host, ORBInitialPort
                IIOPProfileTemplate templ = (IIOPProfileTemplate)
                    ior.getProfile().getTaggedProfileTemplate();
                IIOPAddress addr = templ.getPrimaryAddress();
                SocketInfo info = IORToSocketInfoImpl.createSocketInfo(
            "SecurityMechanismSelector1",
                        "SSL", addr.getHost(), ORBManager.getORBInitialPort());
                //SocketInfo[] sInfos = new SocketInfo[]{info};
                List<SocketInfo> sInfos = new ArrayList<SocketInfo>();
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

        }

        if (ssl == null) {
            if (isSslRequired()) {
                // Attempt to create SSL connection to host, ORBInitialPort
                IIOPProfileTemplate templ = (IIOPProfileTemplate)
                    ior.getProfile().getTaggedProfileTemplate();
                IIOPAddress addr = templ.getPrimaryAddress();
                info = IORToSocketInfoImpl.createSocketInfo(
            "SecurityMechanismSelector1",
                        "SSL", addr.getHost(), orbHelper.getORBPort(orbHelper.getORB()));
                return info;
            } else {
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

        }

        if (ssl == null) {
            if (isSslRequired()) {
                // Attempt to create SSL connection to host, ORBInitialPort
                IIOPProfileTemplate templ = (IIOPProfileTemplate)
                    ior.getProfile().getTaggedProfileTemplate();
                IIOPAddress addr = templ.getPrimaryAddress();
                SocketInfo info = IORToSocketInfoImpl.createSocketInfo(
            "SecurityMechanismSelector1",
                        "SSL", addr.getHost(), orbHelper.getORBPort(orbHelper.getORB()));
                //SocketInfo[] sInfos = new SocketInfo[]{info};
                List<SocketInfo> sInfos = new ArrayList<SocketInfo>();
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

     * @param the IOR.
     * @return the array of compound security mechanisms.
     */
    public CompoundSecMech[] getSecurityMechanisms(IOR ior) {
  IIOPProfile prof = ior.getProfile();
  IIOPProfileTemplate ptemp = (IIOPProfileTemplate)prof.
           getTaggedProfileTemplate();
  Iterator<TaggedComponent> itr = ptemp.iteratorById(
      TAG_CSI_SEC_MECH_LIST.value);

  if(!itr.hasNext()) {
            if(_logger.isLoggable(Level.FINE)){
                String msg = "IIOP:TAG_CSI_SEC_MECH_LIST tagged component not found";
View Full Code Here

Examples of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg + ".getSocketInfo->:");
      }
            List result = new ArrayList();
           
            IIOPProfileTemplate iiopProfileTemplate = (IIOPProfileTemplate)ior.
                                 getProfile().getTaggedProfileTemplate();
            IIOPAddress primary = iiopProfileTemplate.getPrimaryAddress() ;
            String host = primary.getHost().toLowerCase();

            String type = null;
            int port = 0;
            ConnectionContext ctx = new ConnectionContext();
            SocketInfo socketInfo = selector.getSSLPort(ior, ctx);
            selector.setClientConnectionContext(ctx);
            if (socketInfo == null) {
                type = SocketInfo.IIOP_CLEAR_TEXT;
                port = primary.getPort();
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: did not find SSL SocketInfo");
    }
            } else {
                type = socketInfo.getType();
                port = socketInfo.getPort();
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: found SSL socketInfo");
    }
            }
       
      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: Connection Context:" + ctx);
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: ENDPOINT INFO:type=" + type + ",host=" +host + ", port=" + port);
      }

            // for SSL
            if (socketInfo != null ) {
                result.add(socketInfo);
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: returning SSL socketInfo:"
        + " " + socketInfo.getType()
        + " " + socketInfo.getHost()
        + " " + socketInfo.getPort());
    }
    // REVISIT: should call IIOPPrimaryToContactInfo.reset
    // right here to invalidate sticky for this result.
    // However, SSL and IIOP-FO is not a supported feature.
                return result;
            }

      ////////////////////////////////////////////////////
      //
      // The remainder of this code is non-SSL.
      // Author: Harold Carr
      // Please contact author is changes needed.
      //

            // for non-SSL
      if (_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, baseMsg
          + ".getSocketInfo: returning non SSL socketInfo");
      }

      if (! previous.isEmpty()) {
    if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, baseMsg
        + ".getSocketInfo: returning previous socketInfo: "
        + previous);
    }
    return previous;
      }

      //
      // Save and add primary address
      //

      SocketInfo primarySocketInfo =
    createSocketInfo("primary", type, host, port);
      result.add(primarySocketInfo);

      //
      // List alternate addresses.
      //

      Iterator iterator = iiopProfileTemplate.iteratorById(
          org.omg.IOP.TAG_ALTERNATE_IIOP_ADDRESS.value
    );

      while (iterator.hasNext()) {
    AlternateIIOPAddressComponent alternate =
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.