Class PreemptiveAuthHttpClientConnection
java.lang.Object
org.jenkinsci.plugins.gitclient.jgit.PreemptiveAuthHttpClientConnection
- All Implemented Interfaces:
org.eclipse.jgit.transport.http.HttpConnection
public class PreemptiveAuthHttpClientConnection
extends Object
implements org.eclipse.jgit.transport.http.HttpConnection
A
HttpConnection
which uses HttpClient
and attempts to
authenticate preemptively.-
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
ConstructorDescriptionPreemptiveAuthHttpClientConnection
(SmartCredentialsProvider credentialsProvider, String urlStr) PreemptiveAuthHttpClientConnection
(SmartCredentialsProvider credentialsProvider, String urlStr, Proxy proxy) PreemptiveAuthHttpClientConnection
(SmartCredentialsProvider credentialsProvider, String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(KeyManager[] km, TrustManager[] tm, SecureRandom random) void
connect()
int
getHeaderField
(String name) getHeaderFields
(String name) int
getURL()
void
setBuffer
(org.eclipse.jgit.util.TemporaryBuffer buffer) void
setChunkedStreamingMode
(int chunklen) void
setConnectTimeout
(int timeout) void
setDoOutput
(boolean dooutput) void
setFixedLengthStreamingMode
(int contentLength) void
setHostnameVerifier
(HostnameVerifier hostnameverifier) void
setInstanceFollowRedirects
(boolean followRedirects) void
setReadTimeout
(int readTimeout) void
setRequestMethod
(String method) void
setRequestProperty
(String name, String value) void
setUseCaches
(boolean usecaches) boolean
-
Constructor Details
-
PreemptiveAuthHttpClientConnection
public PreemptiveAuthHttpClientConnection(SmartCredentialsProvider credentialsProvider, String urlStr) -
PreemptiveAuthHttpClientConnection
public PreemptiveAuthHttpClientConnection(SmartCredentialsProvider credentialsProvider, String urlStr, Proxy proxy) -
PreemptiveAuthHttpClientConnection
public PreemptiveAuthHttpClientConnection(SmartCredentialsProvider credentialsProvider, String urlStr, Proxy proxy, org.apache.http.client.HttpClient cl)
-
-
Method Details
-
setBuffer
public void setBuffer(org.eclipse.jgit.util.TemporaryBuffer buffer) -
getResponseCode
- Specified by:
getResponseCode
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
- Throws:
IOException
-
getURL
- Specified by:
getURL
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getResponseMessage
- Specified by:
getResponseMessage
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
- Throws:
IOException
-
getHeaderFields
- Specified by:
getHeaderFields
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getHeaderFields
- Specified by:
getHeaderFields
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setRequestProperty
- Specified by:
setRequestProperty
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setRequestMethod
- Specified by:
setRequestMethod
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setUseCaches
public void setUseCaches(boolean usecaches) - Specified by:
setUseCaches
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setConnectTimeout
public void setConnectTimeout(int timeout) - Specified by:
setConnectTimeout
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setReadTimeout
public void setReadTimeout(int readTimeout) - Specified by:
setReadTimeout
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getContentType
- Specified by:
getContentType
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getInputStream
- Specified by:
getInputStream
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
- Throws:
IOException
-
getHeaderField
- Specified by:
getHeaderField
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getContentLength
public int getContentLength()- Specified by:
getContentLength
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setInstanceFollowRedirects
public void setInstanceFollowRedirects(boolean followRedirects) - Specified by:
setInstanceFollowRedirects
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setDoOutput
public void setDoOutput(boolean dooutput) - Specified by:
setDoOutput
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setFixedLengthStreamingMode
public void setFixedLengthStreamingMode(int contentLength) - Specified by:
setFixedLengthStreamingMode
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getOutputStream
- Specified by:
getOutputStream
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
setChunkedStreamingMode
public void setChunkedStreamingMode(int chunklen) - Specified by:
setChunkedStreamingMode
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
getRequestMethod
- Specified by:
getRequestMethod
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
usingProxy
public boolean usingProxy()- Specified by:
usingProxy
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
connect
- Specified by:
connect
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
- Throws:
IOException
-
setHostnameVerifier
- Specified by:
setHostnameVerifier
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
-
configure
public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException - Specified by:
configure
in interfaceorg.eclipse.jgit.transport.http.HttpConnection
- Throws:
KeyManagementException
-