Vaildate host port.

@param host
the host
@param port
the port
183715
private void vaildateHostPort(String host, String port)
    {
        if (host == null || !StringUtils.isNumeric(port) || port.isEmpty())
        {
            logger.error("Host or port should not be null / port should be numeric");
            throw new IllegalArgumentException("Host or port should not be null / port should be numeric");
        }
    }
1128611
public static String extractPort(final String host) {
        if (containsPort(host)) {
            return host.substring(host.indexOf(":") + 1, host.length());
        } else {
            return null;
        }
    }
498593
public static function Init(?string $host = null, ?int $port = null, ?int $ttlDefault = null, ?int $ttlMax = null, ?int $ttlTags = null, ?bool $useTagsBuffer = null) :void
        {
            if (!self::IsSupported()) {
                throw new \Exception('Memcache is not supported!');
            }

            if (self::$inited) {
                return;
            }

            self::$inited = true;

            self::$host = is_null($host) ? Cfg::Get('Vxn.cache.memcache.host') : $host;
            self::$port = is_null($port) ? Cfg::Get('Vxn.cache.memcache.port') : $port;

            self::$ttlDefault    = is_null($ttlDefault) ? Cfg::Get('Vxn.cache.memcache.ttl.default') : $ttlDefault;
            self::$ttlMax        = is_null($ttlMax) ? Cfg::Get('Vxn.cache.memcache.ttl.max') : $ttlMax;
            self::$ttlTags       = is_null($ttlTags) ? Cfg::Get('Vxn.cache.memcache.ttl.tags') : $ttlTags;
            self::$useTagsBuffer = is_null($useTagsBuffer) ? Cfg::Get('Vxn.cache.memcache.useTagsBuffer') : $useTagsBuffer;

            Engine::RegisterFinalShutdown(function () {
                self::CloseConnection();
            });
        }
75814
public final UdpServer host(String host) {
		Objects.requireNonNull(host, "host");
		return bootstrap(b -> b.localAddress(host, getPort(b)));
	}
1319727
public static void setOutputHost(Configuration conf, String host) {
        log.info("setting " + OUTPUT_HOST + " to " + host);
        conf.set(OUTPUT_HOST, host);
    }
1275504
public static void removeDnsCache(String host) {
        try {
            InetAddressCacheUtil.removeInetAddressCache(host);
        } catch (Exception e) {
            final String message = String.format("Fail to removeDnsCache for host %s, cause: %s", host, e.toString());
            throw new DnsCacheManipulatorException(message, e);
        }
    }
781533
public static Proxy socksProxy(String host, int port) {
        return new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(Objects.requireNonNull(host), port));
    }
1126681
public final B host(String host, int port) {
        requireNonNull(host, "host");
        checkArgument(!host.startsWith("group:"), "host: %s (must not start with 'group:')", host);
        checkArgument(port >= 1 && port < 65536, "port: %s (expected: 1 .. 65535)", port);

        final InetSocketAddress addr = newEndpoint(host, port);
        checkState(selectedProfile == null, "profile() and host() cannot be used together.");
        hosts = ImmutableSet.<InetSocketAddress>builder().addAll(hosts).add(addr).build();
        return self();
    }
882248
@Override
	public synchronized void removeHost(Host host) {

        if( log.isDebugEnabled() )
            log.debug("Removing host[" + host.getName() + "]");

        // Is this Host actually among those that are defined?
        boolean found = false;
        for (int i = 0; i < engines.length; i++) {
            Container hosts[] = engines[i].findChildren();
            for (int j = 0; j < hosts.length; j++) {
                if (host == (Host) hosts[j]) {
                    found = true;
                    break;

                }
            }
            if (found)
                break;
        }
        if (!found)
            return;

        // Remove this Host from the associated Engine
        if( log.isDebugEnabled() )
            log.debug(" Removing this Host");
        host.getParent().removeChild(host);

    }
1065904
public void setServer (String hostname, int[] ports, int[] datagramPorts)
    {
        _hostname = hostname;
        _ports = ports;
        _datagramPorts = datagramPorts;
    }
612230
public static String toSocketAddressString(String host, int port) {
        String portStr = String.valueOf(port);
        return newSocketAddressStringBuilder(
                host, portStr, !isValidIpV6Address(host)).append(':').append(portStr).toString();
    }
371071
def free_port_for_host_above(host, port)
      test_port = port
      test_port += 1 until port_free?(host, test_port) || port + 100 <= test_port
      test_port
    end
482531
public void activate(InetAddress host, int port, Collection<String> nonProxyHosts) {
        for (String scheme : new String[] {"http", "https"}) {
            String currentProxyHost = System.getProperty(scheme + ".proxyHost");
            String currentProxyPort = System.getProperty(scheme + ".proxyPort");
            if (currentProxyHost != null) {
                originalProxies.put(scheme, new InetSocketAddress(currentProxyHost, Integer.parseInt(currentProxyPort)));
            }
            System.setProperty(scheme + ".proxyHost", new InetSocketAddress(host, port).getHostString());
            System.setProperty(scheme + ".proxyPort", Integer.toString(port));
        }

        String currentNonProxyHosts = System.getProperty("http.nonProxyHosts");
        if (currentNonProxyHosts == null) {
            originalNonProxyHosts.clear();
        } else {
            for (String nonProxyHost : Splitter.on('|').split(currentNonProxyHosts)) {
                originalNonProxyHosts.add(nonProxyHost);
            }
        }
        System.setProperty("http.nonProxyHosts", Joiner.on('|').join(nonProxyHosts));
    }
1328893
public void setSite(String v) {
    if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_site == null)
      jcasType.jcas.throwFeatMissing("site", "ch.epfl.bbp.uima.genia.Event");
    jcasType.ll_cas.ll_setStringValue(addr, ((Event_Type)jcasType).casFeatCode_site, v);}
1039703
public static void setInputHost(Configuration conf, String host) {
        log.info("setting " + INPUT_HOST + " to " + host);
        conf.set(INPUT_HOST, host);
    }
746196
public void addThriftServer(String host, int port, byte[] serverID) {
		addThriftServer(new ThriftServerInfo(host, port, serverID));
	}
1112372
private boolean validateServer(String host, int port){
        if(host==null || host.isEmpty()){
            return false;
        }
        if(port <=0 || port > 65535){
            return false;
        }
        return true;
    }