Top Description Fields Constructors Methods
org.springframework.http.client

pack-priv Class JettyClientHttpRequest

extends AbstractStreamingClientHttpRequest
Class Inheritance
Imports
java.io.BufferedOutputStream, .IOException, .OutputStream, .UncheckedIOException, java.net.URI, java.util.concurrent.ExecutionException, .TimeUnit, .TimeoutException, org.eclipse.jetty.client.InputStreamResponseListener, .OutputStreamRequestContent, .Request, .Response, org.springframework.http.HttpHeaders, .HttpMethod, org.springframework.lang.Nullable, org.springframework.util.StreamUtils

ClientHttpRequest implementation based on Jetty's org.eclipse.jetty.client.HttpClient.
Author
Arjen Poutsma
Since
6.1
See Also
JettyClientHttpRequestFactory

Field Summary

Modifier and TypeField and Description
private static final int
private final long
private final Request

Constructor Summary

AccessConstructor and Description
public
JettyClientHttpRequest(Request request, long readTimeout)

Method Summary

Modifier and TypeMethod and Description
protected ClientHttpResponse
executeInternal(HttpHeaders
the HTTP headers
headers
,
StreamingHttpOutputMessage.Body
the HTTP body, may be null if no body was set
body
)

Implements abstract org.springframework.http.client.AbstractStreamingClientHttpRequest.executeInternal.

Abstract template method that writes the given headers and content to the HTTP request.
public HttpMethod
getMethod()

Implements org.springframework.http.HttpRequest.getMethod.

Return the HTTP method of the request.
public URI
getURI()

Implements org.springframework.http.HttpRequest.getURI.

Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).
Inherited from org.springframework.http.client.AbstractStreamingClientHttpRequest:
executeInternalgetBodyInternalsetBody

Field Detail

CHUNK_SIZEback to summary
private static final int CHUNK_SIZE
readTimeoutback to summary
private final long readTimeout
requestback to summary
private final Request request

Constructor Detail

JettyClientHttpRequestback to summary
public JettyClientHttpRequest(Request request, long readTimeout)

Method Detail

executeInternalback to summary
protected ClientHttpResponse executeInternal(HttpHeaders headers, StreamingHttpOutputMessage.Body body) throws IOException

Implements abstract org.springframework.http.client.AbstractStreamingClientHttpRequest.executeInternal.

Doc from org.springframework.http.client.AbstractStreamingClientHttpRequest.executeInternal.

Abstract template method that writes the given headers and content to the HTTP request.

Parameters
headers:HttpHeaders

the HTTP headers

body:StreamingHttpOutputMessage.Body

the HTTP body, may be null if no body was set

Returns:ClientHttpResponse

the response object for the executed request

Annotations
@Override
getMethodback to summary
public HttpMethod getMethod()

Implements org.springframework.http.HttpRequest.getMethod.

Doc from org.springframework.http.HttpRequest.getMethod.

Return the HTTP method of the request.

Returns:HttpMethod

the HTTP method as an HttpMethod value

Annotations
@Override
getURIback to summary
public URI getURI()

Implements org.springframework.http.HttpRequest.getURI.

Doc from org.springframework.http.HttpRequest.getURI.

Return the URI of the request (including a query string if any, but only if it is well-formed for a URI representation).

Returns:URI

the URI of the request (never null)

Annotations
@Override