Gets the configured port, or -1 if the port is not set or has an invalid value.<p>

The port is used to signal to the LetsEncrypt docker container that the certificate configuration has changed.

@return the configured port
332462
public int getPort() {

        try {
            String portStr = m_config.get(ATTR_PORT);
            return Integer.valueOf(portStr).intValue();
        } catch (Exception e) {
            LOG.error("Error getting letsencrypt port: " + e.getLocalizedMessage(), e);
            return -1;
        }
    }
220431
public int determinePort() {
		if (CollectionUtils.isEmpty(this.parsedAddresses)) {
			return getPort();
		}
		Address address = this.parsedAddresses.get(0);
		return address.port;
	}
477300
public synchronized int next() {
        while(nextPort <= MAX_STATIC_PORT) {
            int port = nextPort++;
            if (MiscUtils.isBindable(port)) {
                return port;
            }
        }
        throw new RuntimeException("Exhausted all possible ports");
    }
625983
public Integer getPort(int defaultPort)
	{
		String port = getParameterValue(PORT);

		try
		{
			if (port != null)
			{
				return Integer.parseInt(port);
			}
		}
		catch (Exception ex)
		{

		}
		
		return defaultPort;
	}
1224246
public String getHost()
    {
        // Return already determined host
        if (_host != null) return _host;

        // Return host from absolute URI
        _host = _uri.getHost();
        _port = _uri.getPort();
        if (_host != null) return _host;

        // Return host from header field
        _hostPort = _header.get(HttpFields.__Host);
        _host = _hostPort;
        _port = 0;
        if (_host != null && _host.length() > 0)
        {
            int colon = _host.lastIndexOf(':');
            if (colon >= 0)
            {
                if (colon < _host.length())
                {
                    try
                    {
                        _port = TypeUtil.parseInt(_host, colon + 1, -1, 10);
                    }
                    catch (Exception e)
                    {
                        LogSupport.ignore(log, e);
                    }
                }
                _host = _host.substring(0, colon);
            }

            return _host;
        }

        // Return host from connection
        if (_connection != null)
        {
            _host = _connection.getServerName();
            _port = _connection.getServerPort();
            if (_host != null && !InetAddrPort.__0_0_0_0.equals(_host)) return _host;
        }

        // Return the local host
        try
        {
            _host = InetAddress.getLocalHost().getHostAddress();
        }
        catch (java.net.UnknownHostException e)
        {
            LogSupport.ignore(log, e);
        }
        return _host;
    }
956200
protected Socket getSocket(){
        if (mSocketFactoryRef != null && mSocketFactoryRef.get() != null) {
            return ((SSLSocketFactoryWrapper)mSocketFactoryRef.get()).getSocket();
        }
        return null;
    }
163574
private int getPort() {
		String port = getGangliaConfig(args.getPort(), ganglia, "port",
				DEFAULT_PORT);
		return Integer.parseInt(port);
	}
421188
@Override
  public Configuration getConfiguration() {
    return Tang.Factory.getTang().newConfigurationBuilder()
        .bindNamedParameter(TcpPortRangeBegin.class, String.valueOf(portRangeBegin))
        .bindNamedParameter(TcpPortRangeCount.class, String.valueOf(portRangeCount))
        .bindNamedParameter(TcpPortRangeTryCount.class, String.valueOf(portRangeTryCount))
        .bindSetEntry(EvaluatorConfigurationProviders.class, TcpPortConfigurationProvider.class)
        .build();
  }
7539
public static QueryableStateConfiguration disabled() {
		final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue());
		final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue());
		return new QueryableStateConfiguration(proxyPorts, serverPorts, 0, 0, 0, 0);
	}
172021
public static function getPort() :? int
  {
      // Check for proxy first
      if (isset($_SERVER['HTTP_X_FORWARDED_PORT'])) {
          return (int) $_SERVER['HTTP_X_FORWARDED_PORT'];
      }
      if ('https' === ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '')) {
          return 443;
      }

      return isset($_SERVER['SERVER_PORT']) ?
        (int) $_SERVER['SERVER_PORT'] : null;
  }
1364666
public static String getStaticServer() {
        final StringBuilder staticServerBuilder = new StringBuilder(getStaticServerScheme()).append("://").append(getStaticServerHost());
        final String port = getStaticServerPort();
        if (StringUtils.isNotBlank(port) && !"80".equals(port) && !"443".equals(port)) {
            staticServerBuilder.append(':').append(port);
        }

        return staticServerBuilder.toString();
    }
477509
public com.github.dockerjava.api.DockerClient getDockerClient() {
        if (dockerClient == null) {
            dockerClient = createDockerClient();
        }

        return dockerClient;
    }
1180285
public java.lang.String getContainer() {
    java.lang.Object ref = container_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      container_ = s;
      return s;
    }
  }
1045100
public static synchronized PortRange getTcpSourceInstance() {
        if (tcpSourcePortRange == null) {
            tcpSourcePortRange = new PortRange();
            tcpSourcePortRange.init(
                  CoGProperties.getDefault().getTcpSourcePortRange());
        }
        return tcpSourcePortRange;
    }
907807
public final UdpClient port(int port) {
		return bootstrap(b -> b.remoteAddress(getHost(b), port));
	}
318051
public static SSLSocketFactory getSslSocketFactory() {
    if (!sslDisabled) {
      return SSLSocketFactory.getSocketFactory();
    }

    try {
      final X509Certificate[] _AcceptedIssuers = new X509Certificate[] {};

      final SSLContext ctx = SSLContext.getInstance("TLS");
      final X509TrustManager tm = new X509TrustManager() {
        @Override
        public X509Certificate[] getAcceptedIssuers() {
          return _AcceptedIssuers;
        }
        @Override
        public void checkServerTrusted(final X509Certificate[] chain,
                                       final String authType) throws CertificateException {
        }
        @Override
        public void checkClientTrusted(final X509Certificate[] chain,
                                       final String authType) throws CertificateException {
        }
      };
      ctx.init(null, new TrustManager[] { tm }, new SecureRandom());

      return new SSLSocketFactory(ctx,
                                  SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
    } catch (final Throwable t) {
      throw new RuntimeException(t);
    }
  }
697521
public SockAddr getNetmask() {
		SockAddr sockAddr = null;
		if (this.netmask != null) {
			sockAddr = new SockAddr(this.netmask.getSaFamily().getValue(), this.netmask.getData());
		}
		return sockAddr;
	}