Module org.eclipse.jgit.http.apache
Class HttpClientConnection
java.lang.Object
org.eclipse.jgit.transport.http.apache.HttpClientConnection
- All Implemented Interfaces:
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(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-- Throws:
MalformedURLException
-
HttpClientConnection
Constructor for HttpClientConnection.- Parameters:
urlStr-proxy-- Throws:
MalformedURLException
-
HttpClientConnection
public HttpClientConnection(String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl) throws MalformedURLException Constructor for HttpClientConnection.- Parameters:
urlStr-proxy-cl-- Throws:
MalformedURLException
-
-
Method Details
-
setBuffer
Sets the buffer from which to take the request body- Parameters:
buffer-
-
getResponseCode
- Specified by:
getResponseCodein interfaceHttpConnection- Throws:
IOException
-
getURL
- Specified by:
getURLin interfaceHttpConnection
-
getResponseMessage
- Specified by:
getResponseMessagein interfaceHttpConnection- Throws:
IOException
-
getHeaderFields
- Specified by:
getHeaderFieldsin interfaceHttpConnection
-
setRequestProperty
- Specified by:
setRequestPropertyin interfaceHttpConnection
-
setRequestMethod
- Specified by:
setRequestMethodin interfaceHttpConnection- Throws:
ProtocolException
-
setUseCaches
public void setUseCaches(boolean usecaches) - Specified by:
setUseCachesin interfaceHttpConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout) - Specified by:
setConnectTimeoutin interfaceHttpConnection
-
setReadTimeout
public void setReadTimeout(int readTimeout) - Specified by:
setReadTimeoutin interfaceHttpConnection
-
getContentType
- Specified by:
getContentTypein interfaceHttpConnection
-
getInputStream
- Specified by:
getInputStreamin interfaceHttpConnection- Throws:
IOException
-
getHeaderField
- Specified by:
getHeaderFieldin interfaceHttpConnection
-
getHeaderFields
- Specified by:
getHeaderFieldsin interfaceHttpConnection
-
getContentLength
public int getContentLength()- Specified by:
getContentLengthin interfaceHttpConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean followRedirects) - Specified by:
setInstanceFollowRedirectsin interfaceHttpConnection
-
setDoOutput
public void setDoOutput(boolean dooutput) - Specified by:
setDoOutputin interfaceHttpConnection
-
setFixedLengthStreamingMode
public void setFixedLengthStreamingMode(int contentLength) - Specified by:
setFixedLengthStreamingModein interfaceHttpConnection
-
getOutputStream
- Specified by:
getOutputStreamin interfaceHttpConnection- Throws:
IOException
-
setChunkedStreamingMode
public void setChunkedStreamingMode(int chunklen) - Specified by:
setChunkedStreamingModein interfaceHttpConnection
-
getRequestMethod
- Specified by:
getRequestMethodin interfaceHttpConnection
-
usingProxy
public boolean usingProxy()- Specified by:
usingProxyin interfaceHttpConnection
-
connect
- Specified by:
connectin interfaceHttpConnection- Throws:
IOException
-
setHostnameVerifier
- Specified by:
setHostnameVerifierin interfaceHttpConnection
-
configure
public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException - Specified by:
configurein interfaceHttpConnection- Throws:
KeyManagementException
-