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

public Class JettyClientHttpConnector

extends Object
implements ClientHttpConnector
Class Inheritance
All Implemented Interfaces
org.springframework.http.client.reactive.ClientHttpConnector
Imports
java.net.URI, java.nio.ByteBuffer, java.nio.charset.Charset, java.util.concurrent.atomic.AtomicInteger, java.util.function.Consumer, .Function, .IntPredicate, org.eclipse.jetty.client.HttpClient, .Request, org.eclipse.jetty.io.Content, reactor.core.publisher.Flux, .Mono, org.springframework.core.io.buffer.DataBuffer, .DataBufferFactory, .DefaultDataBufferFactory, .PooledDataBuffer, .TouchableDataBuffer, org.springframework.http.HttpMethod, org.springframework.lang.Nullable, org.springframework.util.Assert

ClientHttpConnector for the Jetty Reactive Streams HttpClient.
Author
Sebastien Deleuze
Since
5.1
See Also
Jetty ReactiveStreams HttpClient

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private DataBufferFactory
private final HttpClient

Constructor Summary

AccessConstructor and Description
public
JettyClientHttpConnector()

Default constructor that creates a new instance of HttpClient.

public
JettyClientHttpConnector(HttpClient httpClient)

Constructor with an initialized HttpClient.

public
JettyClientHttpConnector(HttpClient
the HttpClient to use
httpClient
,
JettyResourceFactory resourceFactory)

Constructor with an initialized HttpClient and configures it with the given JettyResourceFactory.

public
JettyClientHttpConnector(JettyResourceFactory resourceFactory, Consumer<HttpClient>
the lambda used to customize the HttpClient
customizer
)

Constructor with an JettyResourceFactory that will manage shared resources.

Method Summary

Modifier and TypeMethod and Description
public Mono<ClientHttpResponse>
connect(HttpMethod
the HTTP request method
method
,
URI
the HTTP request URI
uri
,
Function<? super ClientHttpRequest, Mono<Void>>
a function that prepares and writes to the request, returning a publisher that signals when it's done writing. Implementations can return a Mono<Void> by calling ClientHttpRequest#writeWith or ClientHttpRequest#setComplete.
requestCallback
)

Implements org.springframework.http.client.reactive.ClientHttpConnector.connect.

Connect to the origin server using the given HttpMethod and URI and apply the given requestCallback when the HTTP request of the underlying API can be initialized and written to.
private Mono<ClientHttpResponse>
public void
setBufferFactory(DataBufferFactory bufferFactory)

Set the buffer factory to use.

private DataBuffer
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait