1 /* 2 * Copyright (C) 2013 Christian Halstrick <christian.halstrick@sap.com> and others 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the Eclipse Distribution License v. 1.0 which is available at 6 * https://www.eclipse.org/org/documents/edl-v10.php. 7 * 8 * SPDX-License-Identifier: BSD-3-Clause 9 */ 10 package org.eclipse.jgit.transport.http; 11 12 import java.io.IOException; 13 import java.net.Proxy; 14 import java.net.URL; 15 16 /** 17 * The interface of a factory returning 18 * {@link org.eclipse.jgit.transport.http.HttpConnection} 19 * 20 * @since 3.3 21 */ 22 public interface HttpConnectionFactory { 23 /** 24 * Creates a new connection to a destination defined by a 25 * {@link java.net.URL} 26 * 27 * @param url 28 * a {@link java.net.URL} object. 29 * @return a {@link org.eclipse.jgit.transport.http.HttpConnection} 30 * @throws java.io.IOException 31 */ 32 HttpConnection create(URL url) throws IOException; 33 34 /** 35 * Creates a new connection to a destination defined by a 36 * {@link java.net.URL} using a proxy 37 * 38 * @param url 39 * a {@link java.net.URL} object. 40 * @param proxy 41 * the proxy to be used 42 * @return a {@link org.eclipse.jgit.transport.http.HttpConnection} 43 * @throws java.io.IOException 44 */ 45 HttpConnection create(URL url, Proxy proxy) 46 throws IOException; 47 }