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

ca.sm360.cronitor.client.CronitorPinger Maven / Gradle / Ivy

Go to download

cronitor-client is a simple Java library designed to help you monitoring, with www.cronitor.io, the routines of your Java projects

There is a newer version: 1.0.1
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy