diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java index 54258fe8a..281930047 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java @@ -96,7 +96,8 @@ import org.eclipse.jgit.util.TemporaryBuffer.LocalFile; /** - * A {@link HttpConnection} which uses {@link HttpClient} + * A {@link org.eclipse.jgit.transport.http.HttpConnection} which uses + * {@link org.apache.http.client.HttpClient} * * @since 3.3 */ @@ -188,6 +189,8 @@ public void setBuffer(TemporaryBuffer buffer) { } /** + * Constructor for HttpClientConnection. + * * @param urlStr * @throws MalformedURLException */ @@ -196,6 +199,8 @@ public HttpClientConnection(String urlStr) throws MalformedURLException { } /** + * Constructor for HttpClientConnection. + * * @param urlStr * @param proxy * @throws MalformedURLException @@ -206,6 +211,8 @@ public HttpClientConnection(String urlStr, Proxy proxy) } /** + * Constructor for HttpClientConnection. + * * @param urlStr * @param proxy * @param cl @@ -218,17 +225,20 @@ public HttpClientConnection(String urlStr, Proxy proxy, HttpClient cl) this.proxy = proxy; } + /** {@inheritDoc} */ @Override public int getResponseCode() throws IOException { execute(); return resp.getStatusLine().getStatusCode(); } + /** {@inheritDoc} */ @Override public URL getURL() { return url; } + /** {@inheritDoc} */ @Override public String getResponseMessage() throws IOException { execute(); @@ -257,6 +267,7 @@ private void execute() throws IOException, ClientProtocolException { } } + /** {@inheritDoc} */ @Override public Map> getHeaderFields() { Map> ret = new HashMap<>(); @@ -269,11 +280,13 @@ public Map> getHeaderFields() { return ret; } + /** {@inheritDoc} */ @Override public void setRequestProperty(String name, String value) { req.addHeader(name, value); } + /** {@inheritDoc} */ @Override public void setRequestMethod(String method) throws ProtocolException { this.method = method; @@ -291,21 +304,25 @@ public void setRequestMethod(String method) throws ProtocolException { } } + /** {@inheritDoc} */ @Override public void setUseCaches(boolean usecaches) { // not needed } + /** {@inheritDoc} */ @Override public void setConnectTimeout(int timeout) { this.timeout = Integer.valueOf(timeout); } + /** {@inheritDoc} */ @Override public void setReadTimeout(int readTimeout) { this.readTimeout = Integer.valueOf(readTimeout); } + /** {@inheritDoc} */ @Override public String getContentType() { HttpEntity responseEntity = resp.getEntity(); @@ -317,18 +334,21 @@ public String getContentType() { return null; } + /** {@inheritDoc} */ @Override public InputStream getInputStream() throws IOException { return resp.getEntity().getContent(); } // will return only the first field + /** {@inheritDoc} */ @Override public String getHeaderField(String name) { Header header = resp.getFirstHeader(name); return (header == null) ? null : header.getValue(); } + /** {@inheritDoc} */ @Override public int getContentLength() { Header contentLength = resp.getFirstHeader("content-length"); //$NON-NLS-1$ @@ -344,16 +364,19 @@ public int getContentLength() { } } + /** {@inheritDoc} */ @Override public void setInstanceFollowRedirects(boolean followRedirects) { this.followRedirects = Boolean.valueOf(followRedirects); } + /** {@inheritDoc} */ @Override public void setDoOutput(boolean dooutput) { // TODO: check whether we can really ignore this. } + /** {@inheritDoc} */ @Override public void setFixedLengthStreamingMode(int contentLength) { if (entity != null) @@ -362,6 +385,7 @@ public void setFixedLengthStreamingMode(int contentLength) { entity.setContentLength(contentLength); } + /** {@inheritDoc} */ @Override public OutputStream getOutputStream() throws IOException { if (entity == null) @@ -369,6 +393,7 @@ public OutputStream getOutputStream() throws IOException { return entity.getBuffer(); } + /** {@inheritDoc} */ @Override public void setChunkedStreamingMode(int chunklen) { if (entity == null) @@ -376,26 +401,31 @@ public void setChunkedStreamingMode(int chunklen) { entity.setChunked(true); } + /** {@inheritDoc} */ @Override public String getRequestMethod() { return method; } + /** {@inheritDoc} */ @Override public boolean usingProxy() { return isUsingProxy; } + /** {@inheritDoc} */ @Override public void connect() throws IOException { execute(); } + /** {@inheritDoc} */ @Override public void setHostnameVerifier(final HostnameVerifier hostnameverifier) { this.hostnameverifier = hostnameverifier; } + /** {@inheritDoc} */ @Override public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException { diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnectionFactory.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnectionFactory.java index f97d284b4..4556a34f8 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnectionFactory.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnectionFactory.java @@ -50,16 +50,19 @@ import org.eclipse.jgit.transport.http.HttpConnectionFactory; /** - * A factory returning instances of {@link HttpClientConnection} + * A factory returning instances of + * {@link org.eclipse.jgit.transport.http.apache.HttpClientConnection} * * @since 3.3 */ public class HttpClientConnectionFactory implements HttpConnectionFactory { + /** {@inheritDoc} */ @Override public HttpConnection create(URL url) throws IOException { return new HttpClientConnection(url.toString()); } + /** {@inheritDoc} */ @Override public HttpConnection create(URL url, Proxy proxy) throws IOException { diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java index 3efff49d0..b81e31cef 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java @@ -46,12 +46,12 @@ import java.io.InputStream; import java.io.OutputStream; -import org.apache.http.HttpEntity; import org.apache.http.entity.AbstractHttpEntity; import org.eclipse.jgit.util.TemporaryBuffer; /** - * A {@link HttpEntity} which takes it's content from a {@link TemporaryBuffer} + * A {@link org.apache.http.HttpEntity} which takes its content from a + * {@link org.eclipse.jgit.util.TemporaryBuffer} * * @since 3.3 */ @@ -62,8 +62,8 @@ public class TemporaryBufferEntity extends AbstractHttpEntity private Integer contentLength; /** - * Construct a new {@link HttpEntity} which will contain the content stored - * in the specified buffer + * Construct a new {@link org.apache.http.HttpEntity} which will contain the + * content stored in the specified buffer * * @param buffer */ @@ -72,17 +72,21 @@ public TemporaryBufferEntity(TemporaryBuffer buffer) { } /** + * Get the buffer containing the content + * * @return buffer containing the content */ public TemporaryBuffer getBuffer() { return buffer; } + /** {@inheritDoc} */ @Override public boolean isRepeatable() { return true; } + /** {@inheritDoc} */ @Override public long getContentLength() { if (contentLength != null) @@ -90,23 +94,28 @@ public long getContentLength() { return buffer.length(); } + /** {@inheritDoc} */ @Override public InputStream getContent() throws IOException, IllegalStateException { return buffer.openInputStream(); } + /** {@inheritDoc} */ @Override public void writeTo(OutputStream outstream) throws IOException { // TODO: dont we need a progressmonitor buffer.writeTo(outstream, null); } + /** {@inheritDoc} */ @Override public boolean isStreaming() { return false; } /** + * Set the contentLength + * * @param contentLength */ public void setContentLength(int contentLength) { @@ -114,8 +123,9 @@ public void setContentLength(int contentLength) { } /** - * Close destroys the associated buffer used to buffer the entity + * {@inheritDoc} * + * Close destroys the associated buffer used to buffer the entity * @since 4.5 */ @Override diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/internal/HttpApacheText.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/internal/HttpApacheText.java index 38f157819..1c65230ef 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/internal/HttpApacheText.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/internal/HttpApacheText.java @@ -51,6 +51,8 @@ */ public class HttpApacheText extends TranslationBundle { /** + * Get an instance of this translation bundle. + * * @return an instance of this translation bundle */ public static HttpApacheText get() {