ClientHttpConnector implementation for the Apache HttpComponents HttpClient 5.x.
| Modifier and Type | Class and Description |
|---|---|
| private static class | HttpComponentsClientHttpConnector.
Callback that invoked when a response is received. |
| private static class | HttpComponentsClientHttpConnector.
Callback that invoked when a request is executed. |
| Modifier and Type | Field and Description |
|---|---|
| private final CloseableHttpAsyncClient | |
| private final BiFunction | |
| private DataBufferFactory |
| Access | Constructor and Description |
|---|---|
| public | HttpComponentsClientHttpConnector()
Default constructor that creates and starts a new instance of |
| public | HttpComponentsClientHttpConnector(CloseableHttpAsyncClient
the client to use client)Constructor with a pre-configured |
| public | HttpComponentsClientHttpConnector(CloseableHttpAsyncClient
the client to use client, BiFunction<HttpMethod, URI, ? extends HttpClientContext> a contextProvider)HttpClientContext supplierConstructor with a pre-configured |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public Mono | 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 requestCallback)Mono<Void> by calling
ClientHttpRequest#writeWith or ClientHttpRequest#setComplete.Implements org. Connect to the origin server using the given |
| private Mono | |
| public void |
| client | back to summary |
|---|---|
| private final CloseableHttpAsyncClient client | |
| contextProvider | back to summary |
|---|---|
| private final BiFunction<HttpMethod, URI, ? extends HttpClientContext> contextProvider | |
| dataBufferFactory | back to summary |
|---|---|
| private DataBufferFactory dataBufferFactory | |
| HttpComponentsClientHttpConnector | back to summary |
|---|---|
| public HttpComponentsClientHttpConnector() Default constructor that creates and starts a new instance of | |
| HttpComponentsClientHttpConnector | back to summary |
|---|---|
| public HttpComponentsClientHttpConnector(CloseableHttpAsyncClient client) Constructor with a pre-configured
| |
| HttpComponentsClientHttpConnector | back to summary |
|---|---|
| public HttpComponentsClientHttpConnector(CloseableHttpAsyncClient client, BiFunction<HttpMethod, URI, ? extends HttpClientContext> contextProvider) Constructor with a pre-configured
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| connect | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Connect to the origin server using the given
| |
| execute | back to summary |
|---|---|
| private Mono | |
| setBufferFactory | back to summary |
|---|---|
| public void setBufferFactory(DataBufferFactory bufferFactory) Set the buffer factory to use. | |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpClientContext | |
| private final DataBufferFactory | |
| private final MonoSink |
| Access | Constructor and Description |
|---|---|
| public | ResponseCallback(MonoSink<ClientHttpResponse> sink, DataBufferFactory dataBufferFactory, HttpClientContext context)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | completed(Message<HttpResponse, Publisher<ByteBuffer>> result)
Implements org.
|
| public void |
| context | back to summary |
|---|---|
| private final HttpClientContext context | |
| dataBufferFactory | back to summary |
|---|---|
| private final DataBufferFactory dataBufferFactory | |
| sink | back to summary |
|---|---|
| private final MonoSink<ClientHttpResponse> sink | |
| ResponseCallback | back to summary |
|---|---|
| public ResponseCallback(MonoSink<ClientHttpResponse> sink, DataBufferFactory dataBufferFactory, HttpClientContext context) | |
| cancelled | back to summary |
|---|---|
| public void cancelled() Implements org.
| |
| completed | back to summary |
|---|---|
| public void completed(Message<HttpResponse, Publisher<ByteBuffer>> result) Implements org.
| |
| failed | back to summary |
|---|---|
| public void failed(Exception ex) Implements org.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void |
| sink | back to summary |
|---|---|
| private final MonoSink<?> sink | |
| ResultCallback | back to summary |
|---|---|
| public ResultCallback(MonoSink<?> sink) | |
| cancelled | back to summary |
|---|---|
| public void cancelled() Implements org.
| |
| completed | back to summary |
|---|---|
| public void completed(Void result) Implements org.
| |
| failed | back to summary |
|---|---|
| public void failed(Exception ex) Implements org.
| |