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

pack-priv final Class ReactorNettyClientRequest

extends AbstractStreamingClientHttpRequest
Class Inheritance
Imports
java.io.IOException, .UncheckedIOException, java.net.URI, java.time.Duration, java.util.concurrent.Executor, java.util.concurrent.atomic.AtomicReference, io.netty.buffer.ByteBuf, .ByteBufAllocator, org.reactivestreams.FlowAdapters, .Publisher, reactor.core.publisher.Mono, reactor.netty.NettyOutbound, reactor.netty.http.client.HttpClient, .HttpClientRequest, org.springframework.http.HttpHeaders, .HttpMethod, org.springframework.lang.Nullable, org.springframework.util.StreamUtils

ClientHttpRequest implementation for the Reactor-Netty HTTP client. Created via the ReactorNettyClientRequestFactory.
Author
Arjen Poutsma
Since
6.1

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Duration
private final HttpClient
private final HttpMethod
private final Duration
private final URI

Constructor Summary

AccessConstructor and Description
public
ReactorNettyClientRequest(HttpClient httpClient, URI uri, HttpMethod method, Duration exchangeTimeout, Duration 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).
private Publisher<Void>
send(HttpHeaders headers, StreamingHttpOutputMessage.Body body, HttpClientRequest reactorRequest, NettyOutbound nettyOutbound)

Inherited from org.springframework.http.client.AbstractStreamingClientHttpRequest:
executeInternalgetBodyInternalsetBody

Field Detail

exchangeTimeoutback to summary
private final Duration exchangeTimeout
httpClientback to summary
private final HttpClient httpClient
methodback to summary
private final HttpMethod method
readTimeoutback to summary
private final Duration readTimeout
uriback to summary
private final URI uri

Constructor Detail

ReactorNettyClientRequestback to summary
public ReactorNettyClientRequest(HttpClient httpClient, URI uri, HttpMethod method, Duration exchangeTimeout, Duration 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
sendback to summary
private Publisher<Void> send(HttpHeaders headers, StreamingHttpOutputMessage.Body body, HttpClientRequest reactorRequest, NettyOutbound nettyOutbound)
org.springframework.http.client back to summary

private final Class ReactorNettyClientRequest.ByteBufMapper

extends Object
implements OutputStreamPublisher.ByteMapper<ByteBuf>
Class Inheritance
  • java.lang.Object
  • org.springframework.http.client.ReactorNettyClientRequest.ByteBufMapper
All Implemented Interfaces
org.springframework.http.client.OutputStreamPublisher.ByteMapper

Field Summary

Modifier and TypeField and Description
private final ByteBufAllocator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
public ByteBuf
map(byte[] b, int off, int len)

Implements org.springframework.http.client.OutputStreamPublisher.ByteMapper.map.

Maps a byte array to T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allocatorback to summary
private final ByteBufAllocator allocator

Constructor Detail

ByteBufMapperback to summary
public ByteBufMapper(ByteBufAllocator allocator)

Method Detail

mapback to summary
public ByteBuf map(int b)

Implements org.springframework.http.client.OutputStreamPublisher.ByteMapper.map.

Doc from org.springframework.http.client.OutputStreamPublisher.ByteMapper.map.

Maps a single byte to T.

Annotations
@Override
mapback to summary
public ByteBuf map(byte[] b, int off, int len)

Implements org.springframework.http.client.OutputStreamPublisher.ByteMapper.map.

Doc from org.springframework.http.client.OutputStreamPublisher.ByteMapper.map.

Maps a byte array to T.

Annotations
@Override