View Javadoc
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   * A factory returning instances of
18   * {@link org.eclipse.jgit.transport.http.JDKHttpConnection}
19   *
20   * @since 3.3
21   */
22  public class JDKHttpConnectionFactory implements HttpConnectionFactory {
23  	/** {@inheritDoc} */
24  	@Override
25  	public HttpConnection create(URL url) throws IOException {
26  		return new JDKHttpConnection(url);
27  	}
28  
29  	/** {@inheritDoc} */
30  	@Override
31  	public HttpConnection create(URL url, Proxy proxy)
32  			throws IOException {
33  		return new JDKHttpConnection(url, proxy);
34  	}
35  }