All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ecfeed.core.webservice.util.RemoteHostHelper Maven / Gradle / Ivy

Go to download

An open library used to connect to the ecFeed service. It can be also used as a standalone testing tool. It is integrated with Junit5 and generates a stream of test cases using a selected algorithm (e.g. Cartesian, N-Wise). There are no limitations associated with the off-line version but the user cannot access the on-line computation servers and the model database.

The newest version!
package com.ecfeed.core.webservice.util;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;

public class RemoteHostHelper {

	public static boolean isHostAlive(String host, int port, int timeout) {
		try (Socket socket = new Socket()) {
			socket.connect(new InetSocketAddress(host, port), timeout);
			return true;
		} catch (IOException e) {
			return false;
		}

	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy