See: Description
Interface | Description |
---|---|
AsyncContentProvider |
A
ContentProvider that notifies listeners that content is available. |
AsyncContentProvider.Listener |
A listener that is notified of content availability
|
ContentDecoder |
ContentDecoder decodes content bytes of a response. |
HttpClientTransport |
HttpClientTransport represents what transport implementations should provide
in order to plug-in a different transport for HttpClient . |
ProtocolHandler |
Exception | Description |
---|---|
HttpResponseException |
HttpClient
, which acts as a central configuration object (for example
for idle timeouts
, max connections per destination
, etc.) and as a factory for 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 HttpExchange
.
An initial request may trigger a sequence of exchanges with one or more servers, called a conversation
and represented by 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.
HttpClient
holds a number of destinations
, which in turn hold a number of
pooled 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
HttpClient
level.
Applications may decide to send the request and wait for the response in a blocking way, using
Request.send()
.
Alternatively, application may ask to be notified of response events asynchronously, using
org.eclipse.jetty.client.api.Request#send(Response.Listener)
.Copyright © 1995-2015 Webtide. All Rights Reserved.