Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2017-12-16 23:04:11 +0000
committerMatthias Sohn2017-12-17 19:05:55 +0000
commit53891d4edafc2fd42390b5fd5c7064c51073a6b8 (patch)
treea70b6a9ebc79acc9bad210d0696de2bd805264c2 /org.eclipse.jgit.http.apache/src/org/eclipse/jgit
parent32022e9764123c6a8191a6496403cffc5c1fcc48 (diff)
downloadjgit-53891d4edafc2fd42390b5fd5c7064c51073a6b8.tar.gz
jgit-53891d4edafc2fd42390b5fd5c7064c51073a6b8.tar.xz
jgit-53891d4edafc2fd42390b5fd5c7064c51073a6b8.zip
Fix javadoc in org.eclipse.jgit.http.apache
Change-Id: I38a4854856b0103790a410b48c1c3d708b6500c1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.http.apache/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java32
-rw-r--r--org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnectionFactory.java5
-rw-r--r--org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java20
-rw-r--r--org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/internal/HttpApacheText.java2
4 files changed, 52 insertions, 7 deletions
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 54258fe8a3..2819300473 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;
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 class HttpClientConnection implements HttpConnection {
}
/**
+ * Constructor for HttpClientConnection.
+ *
* @param urlStr
* @throws MalformedURLException
*/
@@ -196,6 +199,8 @@ public class HttpClientConnection implements HttpConnection {
}
/**
+ * Constructor for HttpClientConnection.
+ *
* @param urlStr
* @param proxy
* @throws MalformedURLException
@@ -206,6 +211,8 @@ public class HttpClientConnection implements HttpConnection {
}
/**
+ * Constructor for HttpClientConnection.
+ *
* @param urlStr
* @param proxy
* @param cl
@@ -218,17 +225,20 @@ public class HttpClientConnection implements HttpConnection {
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 @@ public class HttpClientConnection implements HttpConnection {
}
}
+ /** {@inheritDoc} */
@Override
public Map<String, List<String>> getHeaderFields() {
Map<String, List<String>> ret = new HashMap<>();
@@ -269,11 +280,13 @@ public class HttpClientConnection implements HttpConnection {
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 class HttpClientConnection implements HttpConnection {
}
}
+ /** {@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 class HttpClientConnection implements HttpConnection {
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 class HttpClientConnection implements HttpConnection {
}
}
+ /** {@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 class HttpClientConnection implements HttpConnection {
entity.setContentLength(contentLength);
}
+ /** {@inheritDoc} */
@Override
public OutputStream getOutputStream() throws IOException {
if (entity == null)
@@ -369,6 +393,7 @@ public class HttpClientConnection implements HttpConnection {
return entity.getBuffer();
}
+ /** {@inheritDoc} */
@Override
public void setChunkedStreamingMode(int chunklen) {
if (entity == null)
@@ -376,26 +401,31 @@ public class HttpClientConnection implements HttpConnection {
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 f97d284b46..4556a34f89 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.HttpConnection;
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 3efff49d08..b81e31cefb 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.IOException;
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 class TemporaryBufferEntity extends AbstractHttpEntity
}
/**
+ * Get the <code>buffer</code> 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 class TemporaryBufferEntity extends AbstractHttpEntity
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 <code>contentLength</code>
+ *
* @param contentLength
*/
public void setContentLength(int contentLength) {
@@ -114,8 +123,9 @@ public class TemporaryBufferEntity extends AbstractHttpEntity
}
/**
- * 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 38f1578199..1c65230ef4 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 @@ import org.eclipse.jgit.nls.TranslationBundle;
*/
public class HttpApacheText extends TranslationBundle {
/**
+ * Get an instance of this translation bundle.
+ *
* @return an instance of this translation bundle
*/
public static HttpApacheText get() {

Back to the top