diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java index 8a2b4c7f49c..c1cd7379051 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java @@ -245,10 +245,10 @@ public class HttpClient extends ContainerLifeCycle } /** - * Returns a non thread-safe list of {@link Request.Listener}s that can be modified before + * Returns a non thread-safe list of {@link org.eclipse.jetty.client.api.Request.Listener}s that can be modified before * performing requests. * - * @return a list of {@link Request.Listener} that can be used to add and remove listeners + * @return a list of {@link org.eclipse.jetty.client.api.Request.Listener} that can be used to add and remove listeners */ public List getRequestListeners() { @@ -845,13 +845,13 @@ public class HttpClient extends ContainerLifeCycle /** * Whether request events must be strictly ordered. *

- * {@link Response.CompleteListener}s may send a second request. + * {@link org.eclipse.jetty.client.api.Response.CompleteListener}s may send a second request. * If the second request is for the same destination, there is an inherent race * condition for the use of the connection: the first request may still be associated with the * connection, so the second request cannot use that connection and is forced to open another one. *

* From the point of view of connection usage, the connection is reusable just before the "complete" - * event, so it would be possible to reuse that connection from {@link Response.CompleteListener}s; + * event, so it would be possible to reuse that connection from {@link org.eclipse.jetty.client.api.Response.CompleteListener}s; * but in this case the second request's events will fire before the "complete" events of the first * request. *

diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java index fbda4f71877..28089cf16c3 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpReceiver.java @@ -97,7 +97,7 @@ public abstract class HttpReceiver * Subclasses must have set the response status code on the {@link Response} object of the {@link HttpExchange} * prior invoking this method. *

- * This method takes case of notifying {@link Response.BeginListener}s. + * This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.BeginListener}s. * * @param exchange the HTTP exchange * @return whether the processing should continue @@ -134,7 +134,7 @@ public abstract class HttpReceiver * Subclasses must not have added the header to the {@link Response} object of the {@link HttpExchange} * prior invoking this method. *

- * This method takes case of notifying {@link Response.HeaderListener}s and storing cookies. + * This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.HeaderListener}s and storing cookies. * * @param exchange the HTTP exchange * @param field the response HTTP field @@ -210,7 +210,7 @@ public abstract class HttpReceiver /** * Method to be invoked after all response HTTP headers are available. *

- * This method takes case of notifying {@link Response.HeadersListener}s. + * This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.HeadersListener}s. * * @param exchange the HTTP exchange * @return whether the processing should continue @@ -264,7 +264,7 @@ public abstract class HttpReceiver /** * Method to be invoked when response HTTP content is available. *

- * This method takes case of decoding the content, if necessary, and notifying {@link Response.ContentListener}s. + * This method takes case of decoding the content, if necessary, and notifying {@link org.eclipse.jetty.client.api.Response.ContentListener}s. * * @param exchange the HTTP exchange * @param buffer the response HTTP content buffer @@ -312,8 +312,8 @@ public abstract class HttpReceiver /** * Method to be invoked when the response is successful. *

- * This method takes case of notifying {@link Response.SuccessListener}s and possibly - * {@link Response.CompleteListener}s (if the exchange is completed). + * This method takes case of notifying {@link org.eclipse.jetty.client.api.Response.SuccessListener}s and possibly + * {@link org.eclipse.jetty.client.api.Response.CompleteListener}s (if the exchange is completed). * * @param exchange the HTTP exchange * @return whether the response was processed as successful @@ -359,7 +359,7 @@ public abstract class HttpReceiver /** * Method to be invoked when the response is failed. *

- * This method takes care of notifying {@link Response.FailureListener}s. + * This method takes care of notifying {@link org.eclipse.jetty.client.api.Response.FailureListener}s. * * @param failure the response failure * @return whether the response was processed as failed diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/package-info.java b/jetty-client/src/main/java/org/eclipse/jetty/client/package-info.java index 1c9b859c4e1..6278b0df121 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/package-info.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/package-info.java @@ -21,25 +21,25 @@ * * This package provides APIs, utility classes and an implementation of an asynchronous HTTP client. *

- * The core class is {@link HttpClient}, which acts as a central configuration object (for example - * for {@link HttpClient#setIdleTimeout(long) idle timeouts}, {@link HttpClient#setMaxConnectionsPerDestination(int) + * The core class is {@link org.eclipse.jetty.client.api.HttpClient}, which acts as a central configuration object (for example + * for {@link org.eclipse.jetty.client.api.HttpClient#setIdleTimeout(long) idle timeouts}, {@link org.eclipse.jetty.client.api.HttpClient#setMaxConnectionsPerDestination(int) * max connections per destination}, etc.) and as a factory for {@link Request} objects. *

* The HTTP protocol is based on the request/response paradigm, a unit that in this implementation is called - * exchange and is represented by {@link HttpExchange}. + * exchange and is represented by {@link org.eclipse.jetty.client.api.HttpExchange}. * An initial request may trigger a sequence of exchanges with one or more servers, called a conversation - * and represented by {@link HttpConversation}. A typical example of a conversation is a redirect, where + * and represented by {@link org.eclipse.jetty.client.api.HttpConversation}. A typical example of a conversation is a redirect, where * upon a request for a resource URI, the server replies with a redirect (for example with the 303 status code) * to another URI. This conversation is made of a first exchange made of the original request and its 303 response, * and of a second exchange made of the request for the new URI and its 200 response. *

- * {@link HttpClient} holds a number of {@link HttpDestination destinations}, which in turn hold a number of - * pooled {@link HttpConnection connections}. + * {@link org.eclipse.jetty.client.api.HttpClient} holds a number of {@link org.eclipse.jetty.client.api.HttpDestination destinations}, which in turn hold a number of + * pooled {@link org.eclipse.jetty.client.api.HttpConnection connections}. *

* When a request is sent, its exchange is associated to a connection, either taken from an idle queue or created * anew, and when both the request and response are completed, the exchange is disassociated from the connection. * Conversations may span multiple connections on different destinations, and therefore are maintained at the - * {@link HttpClient} level. + * {@link org.eclipse.jetty.client.api.HttpClient} level. *

* Applications may decide to send the request and wait for the response in a blocking way, using * {@link Request#send()}. diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/util/BufferingResponseListener.java b/jetty-client/src/main/java/org/eclipse/jetty/client/util/BufferingResponseListener.java index 9591ca68362..bc4860f76ac 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/util/BufferingResponseListener.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/util/BufferingResponseListener.java @@ -24,12 +24,13 @@ import java.nio.charset.UnsupportedCharsetException; import java.util.Locale; import org.eclipse.jetty.client.api.Response; +import org.eclipse.jetty.client.api.Response.Listener; import org.eclipse.jetty.client.api.Result; import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpHeader; /** - *

Implementation of {@link Response.Listener} that buffers the content up to a maximum length + *

Implementation of {@link Listener} that buffers the content up to a maximum length * specified to the constructors.

*

The content may be retrieved from {@link #onSuccess(Response)} or {@link #onComplete(Result)} * via {@link #getContent()} or {@link #getContentAsString()}.

diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamResponseListener.java b/jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamResponseListener.java index 6ac55e6f65e..6a90f7b5e8c 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamResponseListener.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/util/InputStreamResponseListener.java @@ -19,6 +19,7 @@ package org.eclipse.jetty.client.util; import java.io.IOException; + import java.io.InputStream; import java.io.InterruptedIOException; import java.nio.ByteBuffer; @@ -34,13 +35,14 @@ import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.Response; +import org.eclipse.jetty.client.api.Response.Listener; import org.eclipse.jetty.client.api.Result; import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; /** - * Implementation of {@link Response.Listener} that produces an {@link InputStream} + * Implementation of {@link Listener} that produces an {@link InputStream} * that allows applications to read the response content. *

* Typical usage is: