Package com.sun.corba.ee.spi.ior.iiop

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


      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() ;
            Locale loc = Locale.getDefault();
            String host = primary.getHost().toLowerCase(loc);

            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

Related Classes of com.sun.corba.ee.spi.ior.iiop.IIOPProfileTemplate

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.