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

org.kohsuke.github.HttpConnector Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version
package org.kohsuke.github;

import org.kohsuke.github.extras.ImpatientHttpConnector;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

// TODO: Auto-generated Javadoc
/**
 * Pluggability for customizing HTTP request behaviors or using altogether different library.
 *
 * 

* For example, you can implement this to st custom timeouts. * * @author Kohsuke Kawaguchi * @deprecated Use {@link org.kohsuke.github.connector.GitHubConnector} instead. */ @FunctionalInterface @Deprecated public interface HttpConnector { /** * Opens a connection to the given URL. * * @param url * the url * @return the http url connection * @throws IOException * the io exception */ HttpURLConnection connect(URL url) throws IOException; /** * Default implementation that uses {@link URL#openConnection()}. */ HttpConnector DEFAULT = new ImpatientHttpConnector(url -> (HttpURLConnection) url.openConnection()); /** * Stub implementation that is always off-line. */ HttpConnector OFFLINE = url -> { throw new IOException("Offline"); }; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy