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

nbbrd.io.http.URLConnectionFactory Maven / Gradle / Ivy

The newest version!
package nbbrd.io.http;

import lombok.NonNull;
import nbbrd.design.StaticFactoryMethod;

import java.io.IOException;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;

@FunctionalInterface
public interface URLConnectionFactory {

    @NonNull URLConnection openConnection(@NonNull URL url, @NonNull Proxy proxy) throws IOException;

    @StaticFactoryMethod
    static @NonNull URLConnectionFactory getDefault() {
        return URL::openConnection;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy