/*
@see javax.servlet.ServletRequest#getServerPort()
334416
@Override
    public int getServerPort() {
        int port = this.request.getVirtualPort();
        if (-1 == port && null != this.request.getHeader("Host")) {
            // if Host is present, default to scheme
            if ("HTTP".equalsIgnoreCase(this.request.getScheme())) {
                port = 80;
            } else {
                port = 443;
            }
        }
        // if still not found, use the socket information
        if (-1 == port) {
            port = this.connection.getLocalPort();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getServerPort: " + port);
        }
        return port;
    }
608408
public static String getLocalHostPort() {
        String defaultPort = SystemPropertiesUtils.getSystemProperty(
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_SLASH_D_4JPAAS1,
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_ENV_4JPAAS1, ""
                        + RpcServerConf.SERVER_PORT);
        return SystemPropertiesUtils.getSystemProperty(
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_ENV_4JPAAS2, defaultPort);
    }
881880
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.OfflineCallConversionFeedServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.OfflineCallConversionFeedServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.OfflineCallConversionFeedServiceSoapBindingStub(new java.net.URL(OfflineCallConversionFeedServiceInterfacePort_address), this);
                _stub.setPortName(getOfflineCallConversionFeedServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
699398
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.CampaignGroupPerformanceTargetServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.CampaignGroupPerformanceTargetServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.CampaignGroupPerformanceTargetServiceSoapBindingStub(new java.net.URL(CampaignGroupPerformanceTargetServiceInterfacePort_address), this);
                _stub.setPortName(getCampaignGroupPerformanceTargetServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
220116
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201805.PublisherQueryLanguageServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201805.PublisherQueryLanguageServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201805.PublisherQueryLanguageServiceSoapBindingStub(new java.net.URL(PublisherQueryLanguageServiceInterfacePort_address), this);
                _stub.setPortName(getPublisherQueryLanguageServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
800514
public int getPort() {
    final Connector[] connectors = this.server.getConnectors();
    checkState(connectors.length >= 1, "Server must have at least 1 connector");

    // The first connector is created upon initializing the server. That's the one that has the port.
    return connectors[0].getLocalPort();
  }
237351
public java.lang.String getServerIp() {
    java.lang.Object ref = serverIp_;
    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();
      serverIp_ = s;
      return s;
    }
  }
505337
@Override
  protected CharBuffer getHost()
  {
    if (_host.length() > 0) {
      return _host;
    }

    _host.append(_serverName);
    _host.toLowerCase();

    return _host;
  }
916397
public function getServerPort()
    {
        return isset($this->swooleRequest->server['SERVER_PORT']) ? (int) $this->swooleRequest->server['SERVER_PORT'] : null;
    }
1126127
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.CampaignServiceSoapBindingStub(new java.net.URL(CampaignServiceInterfacePort_address), this);
                _stub.setPortName(getCampaignServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
887487
private Server __buildServer() {
        Server mServer = new Server();

        // Connectors...
        Connector[] connectors = getConnectors(mServer);
        if (connectors == null || connectors.length == 0)
            throw new RuntimeException("Missing connectors");

        for (Connector connector : connectors) {
            mServer.addConnector(connector);
        }

        ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS);
        handler.setContextPath("/");
        handler.setResourceBase(System.getProperty("java.io.tmpdir"));

        // Filters...
        for (Map.Entry<String, List<Class<? extends Filter>>> filterEntry : filterMap.entrySet()) {
            for (Class<? extends Filter> filterClass : filterEntry.getValue()) {
                handler.addFilter(filterClass, filterEntry.getKey(), EnumSet.of(DispatcherType.REQUEST));
            }
        }

        // Servlets...
        for (Map.Entry<String, Class<? extends HttpServlet>> servletEntry : servletMap.entrySet()) {
            handler.addServlet(servletEntry.getValue(), servletEntry.getKey());
        }

        // Event listeners...
        for (Class<? extends EventListener> eventListenerClass : servletContextListenerSet) {
            try {
                EventListener eventListener = eventListenerClass.newInstance();
                handler.addEventListener(eventListener);
            } catch (IllegalAccessException | InstantiationException ex) {
                throw new RuntimeException(ex);
            }
        }

        // Error handler...
        if (errorHandler != null)
            handler.setErrorHandler(errorHandler);

        mServer.setHandler(handler);
        return mServer;
    }
23592
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.adwords.axis.v201809.cm.CustomerNegativeCriterionServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.adwords.axis.v201809.cm.CustomerNegativeCriterionServiceSoapBindingStub _stub = new com.google.api.ads.adwords.axis.v201809.cm.CustomerNegativeCriterionServiceSoapBindingStub(new java.net.URL(CustomerNegativeCriterionServiceInterfacePort_address), this);
                _stub.setPortName(getCustomerNegativeCriterionServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
130261
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201811.CompanyServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201811.CompanyServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201811.CompanyServiceSoapBindingStub(new java.net.URL(CompanyServiceInterfacePort_address), this);
                _stub.setPortName(getCompanyServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
25290
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        try {
            if (com.google.api.ads.admanager.axis.v201808.ProductTemplateServiceInterface.class.isAssignableFrom(serviceEndpointInterface)) {
                com.google.api.ads.admanager.axis.v201808.ProductTemplateServiceSoapBindingStub _stub = new com.google.api.ads.admanager.axis.v201808.ProductTemplateServiceSoapBindingStub(new java.net.URL(ProductTemplateServiceInterfacePort_address), this);
                _stub.setPortName(getProductTemplateServiceInterfacePortWSDDServiceName());
                return _stub;
            }
        }
        catch (java.lang.Throwable t) {
            throw new javax.xml.rpc.ServiceException(t);
        }
        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
    }
144923
public static String getServerHost() {
        String ret = getLatkeProperty("serverHost");
        if (null == ret) {
            final RequestContext requestContext = REQUEST_CONTEXT.get();
            if (null != requestContext) {
                ret = requestContext.getRequest().getServerName();
            } else {
                initPublicIP();

                return PUBLIC_IP;
            }
        }

        return ret;
    }
230308
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
        if (portName == null) {
            return getPort(serviceEndpointInterface);
        }
        java.lang.String inputPortName = portName.getLocalPart();
        if ("NetworkServiceInterfacePort".equals(inputPortName)) {
            return getNetworkServiceInterfacePort();
        }
        else  {
            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
            return _stub;
        }
    }
4778
@Override
    public String getServerName() {
        String name = this.request.getVirtualHost();
        if (null == name) {
            name = "localhost";
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getServerName: " + name);
        }
        return name;
    }