Module org.eclipse.jgit.http.apache
Class HttpClientConnection
java.lang.Object
org.eclipse.jgit.transport.http.apache.HttpClientConnection
- All Implemented Interfaces:
org.eclipse.jgit.transport.http.HttpConnection
public class HttpClientConnection
extends Object
implements org.eclipse.jgit.transport.http.HttpConnection
A
HttpConnection which uses
HttpClient- Since:
- 3.3
-
Field Summary
Fields inherited from interface org.eclipse.jgit.transport.http.HttpConnection
HTTP_11_MOVED_PERM, HTTP_11_MOVED_TEMP, HTTP_FORBIDDEN, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_OK, HTTP_SEE_OTHER, HTTP_UNAUTHORIZED -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientConnection(String urlStr) Constructor for HttpClientConnection.HttpClientConnection(String urlStr, Proxy proxy) Constructor for HttpClientConnection.HttpClientConnection(String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl) Constructor for HttpClientConnection. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(KeyManager[] km, TrustManager[] tm, SecureRandom random) voidconnect()intgetHeaderField(String name) getHeaderFields(String name) intgetURL()voidsetBuffer(org.eclipse.jgit.util.TemporaryBuffer buffer) Sets the buffer from which to take the request bodyvoidsetChunkedStreamingMode(int chunklen) voidsetConnectTimeout(int timeout) voidsetDoOutput(boolean dooutput) voidsetFixedLengthStreamingMode(int contentLength) voidsetHostnameVerifier(HostnameVerifier hostnameverifier) voidsetInstanceFollowRedirects(boolean followRedirects) voidsetReadTimeout(int readTimeout) voidsetRequestMethod(String method) voidsetRequestProperty(String name, String value) voidsetUseCaches(boolean usecaches) boolean
-
Constructor Details
-
HttpClientConnection
Constructor for HttpClientConnection.- Parameters:
urlStr- url string- Throws:
MalformedURLException- if url is malformed
-
HttpClientConnection
Constructor for HttpClientConnection.- Parameters:
urlStr- url stringproxy- proxy- Throws:
MalformedURLException- if url is malformed
-
HttpClientConnection
public HttpClientConnection(String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl) throws MalformedURLException Constructor for HttpClientConnection.- Parameters:
urlStr- url stringproxy- proxycl- client- Throws:
MalformedURLException- if url is malformed
-
-
Method Details
-
setBuffer
public void setBuffer(org.eclipse.jgit.util.TemporaryBuffer buffer) Sets the buffer from which to take the request body- Parameters:
buffer- the buffer
-
getResponseCode
- Specified by:
getResponseCodein interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
IOException
-
getURL
- Specified by:
getURLin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getResponseMessage
- Specified by:
getResponseMessagein interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
IOException
-
getHeaderFields
- Specified by:
getHeaderFieldsin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setRequestProperty
- Specified by:
setRequestPropertyin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setRequestMethod
- Specified by:
setRequestMethodin interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
ProtocolException
-
setUseCaches
public void setUseCaches(boolean usecaches) - Specified by:
setUseCachesin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout) - Specified by:
setConnectTimeoutin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setReadTimeout
public void setReadTimeout(int readTimeout) - Specified by:
setReadTimeoutin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getContentType
- Specified by:
getContentTypein interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getInputStream
- Specified by:
getInputStreamin interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
IOException
-
getHeaderField
- Specified by:
getHeaderFieldin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getHeaderFields
- Specified by:
getHeaderFieldsin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getContentLength
public int getContentLength()- Specified by:
getContentLengthin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean followRedirects) - Specified by:
setInstanceFollowRedirectsin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setDoOutput
public void setDoOutput(boolean dooutput) - Specified by:
setDoOutputin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setFixedLengthStreamingMode
public void setFixedLengthStreamingMode(int contentLength) - Specified by:
setFixedLengthStreamingModein interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getOutputStream
- Specified by:
getOutputStreamin interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
IOException
-
setChunkedStreamingMode
public void setChunkedStreamingMode(int chunklen) - Specified by:
setChunkedStreamingModein interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
usingProxy
public boolean usingProxy()- Specified by:
usingProxyin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
connect
- Specified by:
connectin interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
IOException
-
setHostnameVerifier
- Specified by:
setHostnameVerifierin interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
configure
public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException - Specified by:
configurein interfaceorg.eclipse.jgit.transport.http.HttpConnection- Throws:
KeyManagementException
-