Пример #1
0
    public LoopbackAcceptor() {
      final IIOPProfile iiopProfile = (IIOPProfile) IIOPListener.this.profile;
      listenerAddress = (IIOPAddress) iiopProfile.getAddress().copy();

      loopbackAddress = (IIOPAddress) listenerAddress.copy();
      loopbackAddress.setHostname("127.0.0.1");
      isSSL = iiopProfile.getSSL() != null;

      if (isSSL) {
        listenerAddress.setPort(iiopProfile.getSSLPort());
        loopbackAddress.setPort(iiopProfile.getSSLPort());
      }
    }
Пример #2
0
  /** Creates a new IIOPProfile that describes this transport address. */
  private IIOPProfile createAddressProfile() throws ConfigurationException {
    if (acceptor != null) {
      if (address.getPort() == 0) {
        address.setPort(((Acceptor) acceptor).getLocalAddress().getPort());
      } else {
        if (logger.isDebugEnabled()) {
          logger.debug("Using port " + address.getPort());
        }
      }
    } else if (sslAcceptor == null) {
      throw new org.omg.CORBA.INITIALIZE("no acceptors found, cannot create address profile");
    }

    IIOPProfile result = new IIOPProfile(address, null, orb.getGIOPMinorVersion());
    result.configure(configuration);

    if (sslAcceptor != null && generateSSLComponents) {
      result.addComponent(TAG_SSL_SEC_TRANS.value, createSSL(), SSLHelper.class);
    }

    return result;
  }