ca.sm360.cronitor.client.CronitorPinger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cronitor-client Show documentation
Show all versions of cronitor-client Show documentation
cronitor-client is a simple Java library designed to help you monitoring, with www.cronitor.io, the routines of your Java projects
package ca.sm360.cronitor.client;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.logging.Logger;
public class CronitorPinger {
private final static Logger logger = Logger.getLogger(CronitorPinger.class.getName());
public void ping(URL commandURL) throws IOException, URISyntaxException {
logger.info("Will call url : " + commandURL);
HttpURLConnection connection = (HttpURLConnection) commandURL.openConnection();
connection.connect();
connection.getInputStream();
connection.disconnect();
}
}