@Internal public class DefaultHttpClient extends java.lang.Object implements WebSocketClient, HttpClient, StreamingHttpClient, SseClient, ProxyHttpClient, java.io.Closeable, java.lang.AutoCloseable
HttpClient interface based on Netty.| Modifier and Type | Class and Description | 
|---|---|
| protected class  | DefaultHttpClient.HttpClientInitializerInitializes the HTTP client channel. | 
| protected class  | DefaultHttpClient.NettyRequestWriterA Netty request writer. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected io.netty.bootstrap.Bootstrap | bootstrap | 
| protected ByteBufferFactory<io.netty.buffer.ByteBufAllocator,io.netty.buffer.ByteBuf> | byteBufferFactory | 
| protected io.netty.channel.EventLoopGroup | group | 
| protected MediaTypeCodecRegistry | mediaTypeCodecRegistry | 
SCHEME_WS, SCHEME_WSSDEFAULT_ERROR_TYPE| Constructor and Description | 
|---|
| DefaultHttpClient() | 
| DefaultHttpClient(LoadBalancer loadBalancer,
                 HttpClientConfiguration configuration,
                 java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories) | 
| DefaultHttpClient(LoadBalancer loadBalancer,
                 HttpClientConfiguration configuration,
                 java.lang.String contextPath,
                 java.util.concurrent.ThreadFactory threadFactory,
                 NettyClientSslBuilder nettyClientSslBuilder,
                 MediaTypeCodecRegistry codecRegistry,
                 AnnotationMetadataResolver annotationMetadataResolver,
                 java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories,
                 HttpClientFilter... filters)Construct a client for the given arguments. | 
| DefaultHttpClient(LoadBalancer loadBalancer,
                 HttpVersion httpVersion,
                 HttpClientConfiguration configuration,
                 java.lang.String contextPath,
                 HttpClientFilterResolver<ClientFilterResolutionContext> filterResolver,
                 java.util.List<HttpFilterResolver.FilterEntry<HttpClientFilter>> clientFilterEntries,
                 java.util.concurrent.ThreadFactory threadFactory,
                 NettyClientSslBuilder nettyClientSslBuilder,
                 MediaTypeCodecRegistry codecRegistry,
                 WebSocketBeanRegistry webSocketBeanRegistry,
                 RequestBinderRegistry requestBinderRegistry,
                 io.netty.channel.EventLoopGroup eventLoopGroup,
                 io.netty.channel.ChannelFactory socketChannelFactory,
                 java.util.Collection<ChannelPipelineListener> pipelineListeners,
                 java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories)Construct a client for the given arguments. | 
| DefaultHttpClient(java.net.URI uri) | 
| DefaultHttpClient(java.net.URI uri,
                 HttpClientConfiguration configuration) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected <I,O> org.reactivestreams.Publisher<HttpResponse<O>> | applyFilterToResponsePublisher(HttpRequest<?> parentRequest,
                              HttpRequest<I> request,
                              java.net.URI requestURI,
                              java.util.concurrent.atomic.AtomicReference<HttpRequest> requestWrapper,
                              org.reactivestreams.Publisher<HttpResponse<O>> responsePublisher) | 
| protected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<ByteBuffer<?>>> | buildDataStreamPublisher(HttpRequest<I> request)Deprecated. 
 | 
| protected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<ByteBuffer<?>>> | buildDataStreamPublisher(HttpRequest<I> request,
                        Argument<?> errorType) | 
| protected <I,O,E> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<? extends HttpResponse<O>>> | buildExchangePublisher(HttpRequest<?> parentRequest,
                      HttpRequest<I> request,
                      Argument<O> bodyType,
                      Argument<E> errorType) | 
| protected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>>> | buildExchangeStreamPublisher(HttpRequest<I> request,
                            Argument<?> errorType) | 
| protected <I,O> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<O>> | buildJsonStreamPublisher(HttpRequest<?> parentRequest,
                        HttpRequest<I> request,
                        Argument<O> type,
                        Argument<?> errorType) | 
| protected DefaultHttpClient.NettyRequestWriter | buildNettyRequest(MutableHttpRequest request,
                 java.net.URI requestURI,
                 MediaType requestContentType,
                 boolean permitsBody,
                 Argument<?> bodyType,
                 java.util.function.Consumer<? super java.lang.Throwable> onError,
                 boolean closeChannelAfterWrite) | 
| protected io.netty.handler.ssl.SslContext | buildSslContext(java.net.URI uriObject)Builds an  SslContextfor the given URI if necessary. | 
| protected <I> org.reactivestreams.Publisher<HttpResponse<java.lang.Object>> | buildStreamExchange(HttpRequest<?> parentRequest,
                   HttpRequest<I> request,
                   java.net.URI requestURI)Deprecated. 
 | 
| protected <I> org.reactivestreams.Publisher<HttpResponse<java.lang.Object>> | buildStreamExchange(HttpRequest<?> parentRequest,
                   HttpRequest<I> request,
                   java.net.URI requestURI,
                   Argument<?> errorType) | 
| void | close()Delegates to  LifeCycle.stop(). | 
| protected void | closeChannelAsync(io.netty.channel.Channel channel) | 
| protected void | configureHttp2ClearText(DefaultHttpClient.HttpClientInitializer httpClientInitializer,
                       io.netty.channel.socket.SocketChannel ch,
                       io.netty.handler.codec.http2.HttpToHttp2ConnectionHandler connectionHandler)Configures HTTP/2 handling for plaintext (non-SSL) connections. | 
| protected void | configureHttp2Ssl(DefaultHttpClient.HttpClientInitializer httpClientInitializer,
                 io.netty.channel.socket.SocketChannel ch,
                 io.netty.handler.ssl.SslContext sslCtx,
                 java.lang.String host,
                 int port,
                 io.netty.handler.codec.http2.HttpToHttp2ConnectionHandler connectionHandler)Configures HTTP/2 for the channel when SSL is enabled. | 
| protected void | configureProxy(io.netty.channel.ChannelPipeline pipeline,
              java.net.Proxy.Type proxyType,
              java.net.SocketAddress proxyAddress)Configures the HTTP proxy for the pipeline. | 
| protected void | configureProxy(io.netty.channel.ChannelPipeline pipeline,
              java.net.Proxy proxy)Configures the HTTP proxy for the pipeline. | 
| <T extends java.lang.AutoCloseable> | connect(java.lang.Class<T> clientEndpointType,
       java.util.Map<java.lang.String,java.lang.Object> parameters)Connect the given client endpoint type. | 
| <T extends java.lang.AutoCloseable> | connect(java.lang.Class<T> clientEndpointType,
       MutableHttpRequest<?> request)Connect the given client endpoint type to the URI over WebSocket. | 
| protected io.netty.channel.nio.NioEventLoopGroup | createEventLoopGroup(HttpClientConfiguration configuration,
                    java.util.concurrent.ThreadFactory threadFactory)Creates the  NioEventLoopGroupfor this client. | 
| <I> org.reactivestreams.Publisher<ByteBuffer<?>> | dataStream(HttpRequest<I> request)Request a stream of data where each emitted item is a  ByteBufferinstance. | 
| <I> org.reactivestreams.Publisher<ByteBuffer<?>> | dataStream(HttpRequest<I> request,
          Argument<?> errorType)Request a stream of data where each emitted item is a  ByteBufferinstance. | 
| protected io.netty.channel.ChannelFuture | doConnect(io.netty.bootstrap.Bootstrap bootstrap,
         java.lang.String host,
         int port)Creates an initial connection with the given bootstrap and remote host. | 
| protected io.netty.channel.ChannelFuture | doConnect(HttpRequest<?> request,
         java.lang.String host,
         int port,
         io.netty.handler.ssl.SslContext sslCtx,
         boolean isStream,
         java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)Creates an initial connection to the given remote host. | 
| protected io.netty.channel.ChannelFuture | doConnect(HttpRequest<?> request,
         java.net.URI uri,
         io.netty.handler.ssl.SslContext sslCtx,
         boolean isStream,
         java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)Creates an initial connection to the given remote host. | 
| <I> org.reactivestreams.Publisher<Event<ByteBuffer<?>>> | eventStream(HttpRequest<I> request)Perform an HTTP request and receive data as a stream of SSE  Eventobjects as they become available without blocking. | 
| <I,B> org.reactivestreams.Publisher<Event<B>> | eventStream(HttpRequest<I> request,
           Argument<B> eventType)Perform an HTTP request and receive data as a stream of SSE  Eventobjects as they become available without blocking. | 
| <I,B> org.reactivestreams.Publisher<Event<B>> | eventStream(HttpRequest<I> request,
           Argument<B> eventType,
           Argument<?> errorType)Perform an HTTP request and receive data as a stream of SSE  Eventobjects as they become available without blocking. | 
| <I,O,E> org.reactivestreams.Publisher<HttpResponse<O>> | exchange(HttpRequest<I> request,
        Argument<O> bodyType,
        Argument<E> errorType)Perform an HTTP request for the given request object emitting the full HTTP response from returned
  Publisherand converting the response body to the specified type. | 
| <I> org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>> | exchangeStream(HttpRequest<I> request)Requests a stream data where each emitted item is a  ByteBufferwrapped in theHttpResponseobject
 (which remains the same for each emitted item). | 
| <I> org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>> | exchangeStream(HttpRequest<I> request,
              Argument<?> errorType)Requests a stream data where each emitted item is a  ByteBufferwrapped in theHttpResponseobject
 (which remains the same for each emitted item). | 
| HttpClientConfiguration | getConfiguration() | 
| protected java.lang.Object | getLoadBalancerDiscriminator() | 
| org.slf4j.Logger | getLog() | 
| MediaTypeCodecRegistry | getMediaTypeCodecRegistry() | 
| boolean | isRunning() | 
| <I> org.reactivestreams.Publisher<java.util.Map<java.lang.String,java.lang.Object>> | jsonStream(HttpRequest<I> request)Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking. | 
| <I,O> org.reactivestreams.Publisher<O> | jsonStream(HttpRequest<I> request,
          Argument<O> type)Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking. | 
| <I,O> org.reactivestreams.Publisher<O> | jsonStream(HttpRequest<I> request,
          Argument<O> type,
          Argument<?> errorType)Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking. | 
| <I,O> org.reactivestreams.Publisher<O> | jsonStream(HttpRequest<I> request,
          java.lang.Class<O> type)Perform an HTTP request and receive data as a stream of JSON objects as they become available without blocking. | 
| protected io.netty.handler.codec.http2.HttpToHttp2ConnectionHandlerBuilder | newHttp2ConnectionHandlerBuilder(io.netty.handler.codec.http2.Http2Connection connection,
                                HttpClientConfiguration configuration,
                                boolean stream)Creates a new  HttpToHttp2ConnectionHandlerBuilderfor the given HTTP/2 connection object and config. | 
| protected java.net.URI | prependContextPath(java.net.URI requestURI) | 
| org.reactivestreams.Publisher<MutableHttpResponse<?>> | proxy(HttpRequest<?> request)Proxy the given request and emit the response. | 
| protected <I> org.reactivestreams.Publisher<java.net.URI> | resolveRedirectURI(HttpRequest<?> parentRequest,
                  HttpRequest<I> request) | 
| protected <I> org.reactivestreams.Publisher<java.net.URI> | resolveRequestURI(HttpRequest<I> request) | 
| protected <I> org.reactivestreams.Publisher<java.net.URI> | resolveRequestURI(HttpRequest<I> request,
                 boolean includeContextPath) | 
| void | setMediaTypeCodecRegistry(MediaTypeCodecRegistry mediaTypeCodecRegistry)Sets the  MediaTypeCodecRegistryused by this client. | 
| HttpClient | start()Starts the lifecyle component. | 
| HttpClient | stop()Stops the life cycle component. | 
| BlockingHttpClient | toBlocking() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconnect, connect, create, create, create, createcreate, createexchange, exchange, exchange, exchange, exchange, refresh, retrieve, retrieve, retrieve, retrieve, retrievecreate, create, eventStream, eventStream, eventStreamcreate, createprotected final io.netty.bootstrap.Bootstrap bootstrap
protected io.netty.channel.EventLoopGroup group
protected MediaTypeCodecRegistry mediaTypeCodecRegistry
protected ByteBufferFactory<io.netty.buffer.ByteBufAllocator,io.netty.buffer.ByteBuf> byteBufferFactory
public DefaultHttpClient(@Nullable LoadBalancer loadBalancer, @NonNull HttpClientConfiguration configuration, @Nullable java.lang.String contextPath, @Nullable java.util.concurrent.ThreadFactory threadFactory, NettyClientSslBuilder nettyClientSslBuilder, MediaTypeCodecRegistry codecRegistry, @Nullable AnnotationMetadataResolver annotationMetadataResolver, java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories, HttpClientFilter... filters)
loadBalancer - The LoadBalancer to use for selecting serversconfiguration - The HttpClientConfiguration objectcontextPath - The base URI to prepend to request uristhreadFactory - The thread factory to use for client threadsnettyClientSslBuilder - The SSL buildercodecRegistry - The MediaTypeCodecRegistry to use for encoding and decoding objectsannotationMetadataResolver - The annotation metadata resolverinvocationInstrumenterFactories - The invocation instrumeter factories to instrument netty handlers execution withfilters - The filters to usepublic DefaultHttpClient(@Nullable LoadBalancer loadBalancer, @Nullable HttpVersion httpVersion, @NonNull HttpClientConfiguration configuration, @Nullable java.lang.String contextPath, @NonNull HttpClientFilterResolver<ClientFilterResolutionContext> filterResolver, java.util.List<HttpFilterResolver.FilterEntry<HttpClientFilter>> clientFilterEntries, @Nullable java.util.concurrent.ThreadFactory threadFactory, @NonNull NettyClientSslBuilder nettyClientSslBuilder, @NonNull MediaTypeCodecRegistry codecRegistry, @NonNull WebSocketBeanRegistry webSocketBeanRegistry, @NonNull RequestBinderRegistry requestBinderRegistry, @Nullable io.netty.channel.EventLoopGroup eventLoopGroup, @NonNull io.netty.channel.ChannelFactory socketChannelFactory, java.util.Collection<ChannelPipelineListener> pipelineListeners, java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories)
loadBalancer - The LoadBalancer to use for selecting servershttpVersion - The HTTP version to use. Can be null and defaults to HttpVersion.HTTP_1_1configuration - The HttpClientConfiguration objectcontextPath - The base URI to prepend to request urisfilterResolver - The http client filter resolverclientFilterEntries - The client filter entriesthreadFactory - The thread factory to use for client threadsnettyClientSslBuilder - The SSL buildercodecRegistry - The MediaTypeCodecRegistry to use for encoding and decoding objectswebSocketBeanRegistry - The websocket bean registryrequestBinderRegistry - The request binder registryeventLoopGroup - The event loop group to usesocketChannelFactory - The socket channel factorypipelineListeners - The listeners to call for pipeline customizationinvocationInstrumenterFactories - The invocation instrumeter factories to instrument netty handlers execution withpublic DefaultHttpClient(@Nullable java.net.URI uri)
uri - The URLpublic DefaultHttpClient()
public DefaultHttpClient(@Nullable java.net.URI uri, @NonNull HttpClientConfiguration configuration)
uri - The URIconfiguration - The HttpClientConfiguration objectpublic DefaultHttpClient(@Nullable LoadBalancer loadBalancer, HttpClientConfiguration configuration, java.util.List<InvocationInstrumenterFactory> invocationInstrumenterFactories)
loadBalancer - The LoadBalancer to use for selecting serversconfiguration - The HttpClientConfiguration objectinvocationInstrumenterFactories - The invocation instrumeter factories to instrument netty handlers execution withpublic HttpClientConfiguration getConfiguration()
public org.slf4j.Logger getLog()
public HttpClient start()
LifeCyclestart in interface LifeCycle<HttpClient>public boolean isRunning()
isRunning in interface LifeCycle<HttpClient>public HttpClient stop()
LifeCyclestop in interface LifeCycle<HttpClient>public MediaTypeCodecRegistry getMediaTypeCodecRegistry()
MediaTypeCodecRegistry used by this clientpublic void setMediaTypeCodecRegistry(MediaTypeCodecRegistry mediaTypeCodecRegistry)
MediaTypeCodecRegistry used by this client.mediaTypeCodecRegistry - The registry to use. Should not be nullpublic BlockingHttpClient toBlocking()
toBlocking in interface HttpClientpublic <I> org.reactivestreams.Publisher<Event<ByteBuffer<?>>> eventStream(@NonNull HttpRequest<I> request)
SseClientPerform an HTTP request and receive data as a stream of SSE Event objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription
eventStream in interface SseClientI - The request body typerequest - The HttpRequest to executePublisher that emits an Event with the data represented as a ByteBufferpublic <I,B> org.reactivestreams.Publisher<Event<B>> eventStream(@NonNull HttpRequest<I> request, @NonNull Argument<B> eventType)
SseClientPerform an HTTP request and receive data as a stream of SSE Event objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription
eventStream in interface SseClientI - The request body typeB - The event body typerequest - The HttpRequest to executeeventType - The event data typePublisher that emits an Event with the data represented by the eventType argumentpublic <I,B> org.reactivestreams.Publisher<Event<B>> eventStream(@NonNull HttpRequest<I> request, @NonNull Argument<B> eventType, @NonNull Argument<?> errorType)
SseClientPerform an HTTP request and receive data as a stream of SSE Event objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription
eventStream in interface SseClientI - The request body typeB - The event body typerequest - The HttpRequest to executeeventType - The event data typeerrorType - The type that the response body should be coerced into if the server responds with an errorPublisher that emits an Event with the data represented by the eventType argumentpublic <I> org.reactivestreams.Publisher<ByteBuffer<?>> dataStream(@NonNull HttpRequest<I> request)
StreamingHttpClientByteBuffer instance.dataStream in interface StreamingHttpClientI - The request body typerequest - The requestPublisher that emits a stream of ByteBuffer instancespublic <I> org.reactivestreams.Publisher<ByteBuffer<?>> dataStream(@NonNull HttpRequest<I> request, @NonNull Argument<?> errorType)
StreamingHttpClientByteBuffer instance.dataStream in interface StreamingHttpClientI - The request body typerequest - The requesterrorType - The type that the response body should be coerced into if the server responds with an errorPublisher that emits a stream of ByteBuffer instancespublic <I> org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>> exchangeStream(@NonNull HttpRequest<I> request)
StreamingHttpClientByteBuffer wrapped in the HttpResponse object
 (which remains the same for each emitted item).exchangeStream in interface StreamingHttpClientI - The request body typerequest - The HttpRequestPublisher that emits a stream of ByteBuffer instances wrapped by a HttpResponsepublic <I> org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>> exchangeStream(@NonNull HttpRequest<I> request, @NonNull Argument<?> errorType)
StreamingHttpClientByteBuffer wrapped in the HttpResponse object
 (which remains the same for each emitted item).exchangeStream in interface StreamingHttpClientI - The request body typerequest - The HttpRequesterrorType - The type that the response body should be coerced into if the server responds with an errorPublisher that emits a stream of ByteBuffer instances wrapped by a HttpResponsepublic <I,O> org.reactivestreams.Publisher<O> jsonStream(@NonNull HttpRequest<I> request, @NonNull Argument<O> type)
StreamingHttpClientPerform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription. Incoming data
 is buffered.
jsonStream in interface StreamingHttpClientI - The request body typeO - The response typerequest - The HttpRequest to executetype - The type of object to convert the JSON intoPublisher that emits the full HttpResponse objectpublic <I,O> org.reactivestreams.Publisher<O> jsonStream(@NonNull HttpRequest<I> request, @NonNull Argument<O> type, @NonNull Argument<?> errorType)
StreamingHttpClientPerform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription. Incoming data
 is buffered.
jsonStream in interface StreamingHttpClientI - The request body typeO - The response typerequest - The HttpRequest to executetype - The type of object to convert the JSON intoerrorType - The type that the response body should be coerced into if the server responds with an errorPublisher that emits the full HttpResponse objectpublic <I> org.reactivestreams.Publisher<java.util.Map<java.lang.String,java.lang.Object>> jsonStream(@NonNull HttpRequest<I> request)
StreamingHttpClientPerform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription
jsonStream in interface StreamingHttpClientI - The request body typerequest - The HttpRequest to executePublisher that emits the full HttpResponse objectpublic <I,O> org.reactivestreams.Publisher<O> jsonStream(@NonNull HttpRequest<I> request, @NonNull java.lang.Class<O> type)
StreamingHttpClientPerform an HTTP request and receive data as a stream of JSON objects as they become available without blocking.
The downstream Subscriber can regulate demand via the subscription
jsonStream in interface StreamingHttpClientI - The request body typeO - The response typerequest - The HttpRequest to executetype - The type of object to convert the JSON intoPublisher that emits the full HttpResponse objectpublic <I,O,E> org.reactivestreams.Publisher<HttpResponse<O>> exchange(@NonNull HttpRequest<I> request, @NonNull Argument<O> bodyType, @NonNull Argument<E> errorType)
HttpClientPerform an HTTP request for the given request object emitting the full HTTP response from returned
 Publisher and converting the response body to the specified type.
This method will send a Content-Length header and except a content length header the response and is
 designed for simple non-streaming exchanges of data
By default the exchange Content-Type is application/json, unless otherwise specified in the passed
 HttpRequest
exchange in interface HttpClientI - The request body typeO - The response body typeE - The error typerequest - The HttpRequest to executebodyType - The body typeerrorType - The error typePublisher that emits the full HttpResponse objectpublic <T extends java.lang.AutoCloseable> org.reactivestreams.Publisher<T> connect(java.lang.Class<T> clientEndpointType,
                                                                                    MutableHttpRequest<?> request)
WebSocketClientconnect in interface WebSocketClientT - The generic typeclientEndpointType - The endpoint type. Should be a class annotated with ClientWebSocketrequest - The original request to establish the connectionPublisher that emits the ClientWebSocket instancepublic <T extends java.lang.AutoCloseable> org.reactivestreams.Publisher<T> connect(java.lang.Class<T> clientEndpointType,
                                                                                    java.util.Map<java.lang.String,java.lang.Object> parameters)
WebSocketClientWebSocketClient.connect(Class, URI) this method will the value declared within the ClientWebSocket as the URI
 and expand the URI with the given parameters.connect in interface WebSocketClientT - The generic typeclientEndpointType - The endpoint type. Should be a class annotated with ClientWebSocketparameters - The URI parameters for the endpointPublisher that emits the ClientWebSocket instancepublic void close()
LifeCycleLifeCycle.stop().close in interface LifeCycle<HttpClient>close in interface WebSocketClientclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableprotected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<HttpResponse<ByteBuffer<?>>>> buildExchangeStreamPublisher(@NonNull HttpRequest<I> request, @NonNull Argument<?> errorType)
I - The input typerequest - The requesterrorType - The error typeFunctionprotected <I,O> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<O>> buildJsonStreamPublisher(HttpRequest<?> parentRequest, HttpRequest<I> request, Argument<O> type, Argument<?> errorType)
I - The input typeO - The output typeparentRequest - The parent requestrequest - The requesttype - The typeerrorType - The error typeFunction@Deprecated protected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<ByteBuffer<?>>> buildDataStreamPublisher(HttpRequest<I> request)
buildDataStreamPublisher(io.micronaut.http.HttpRequest, Argument) insteadI - The input typerequest - The requestFunctionprotected <I> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<ByteBuffer<?>>> buildDataStreamPublisher(@NonNull HttpRequest<I> request, @NonNull Argument<?> errorType)
I - The input typerequest - The requesterrorType - The error typeFunction@Deprecated protected <I> org.reactivestreams.Publisher<HttpResponse<java.lang.Object>> buildStreamExchange(@Nullable HttpRequest<?> parentRequest, HttpRequest<I> request, java.net.URI requestURI)
buildStreamExchange(io.micronaut.http.HttpRequest, io.micronaut.http.HttpRequest, URI, Argument) instead.I - The input typeparentRequest - The parent requestrequest - The requestrequestURI - The request URIFluxprotected <I> org.reactivestreams.Publisher<HttpResponse<java.lang.Object>> buildStreamExchange(@Nullable HttpRequest<?> parentRequest, @NonNull HttpRequest<I> request, @NonNull java.net.URI requestURI, @NonNull Argument<?> errorType)
I - The input typeparentRequest - The parent requestrequest - The requestrequestURI - The request URIerrorType - The error typeFluxprotected <I,O,E> java.util.function.Function<java.net.URI,org.reactivestreams.Publisher<? extends HttpResponse<O>>> buildExchangePublisher(HttpRequest<?> parentRequest, HttpRequest<I> request, @NonNull Argument<O> bodyType, @NonNull Argument<E> errorType)
I - The input typeO - The output typeE - The error typeparentRequest - The parent requestrequest - The requestbodyType - The body typeerrorType - The error typeFunctionprotected void closeChannelAsync(io.netty.channel.Channel channel)
channel - The channel to close asynchronouslyprotected <I> org.reactivestreams.Publisher<java.net.URI> resolveRequestURI(HttpRequest<I> request)
I - The input typerequest - The requestPublisher with the resolved URIprotected <I> org.reactivestreams.Publisher<java.net.URI> resolveRequestURI(HttpRequest<I> request, boolean includeContextPath)
I - The input typerequest - The requestincludeContextPath - Whether to prepend the client context pathPublisher with the resolved URIprotected <I> org.reactivestreams.Publisher<java.net.URI> resolveRedirectURI(HttpRequest<?> parentRequest, HttpRequest<I> request)
I - The input typeparentRequest - The parent requestrequest - The redirect location requestPublisher with the resolved URIprotected java.net.URI prependContextPath(java.net.URI requestURI)
requestURI - The request URIprotected java.lang.Object getLoadBalancerDiscriminator()
protected io.netty.channel.ChannelFuture doConnect(HttpRequest<?> request, java.net.URI uri, @Nullable io.netty.handler.ssl.SslContext sslCtx, boolean isStream, java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer) throws HttpClientException
request - The requesturi - The URI to connect tosslCtx - The SslContext instanceisStream - Is the connection a stream connectioncontextConsumer - The logic to run once the channel is configured correctlyHttpClientException - If the URI is invalidprotected io.netty.channel.ChannelFuture doConnect(HttpRequest<?> request, java.lang.String host, int port, @Nullable io.netty.handler.ssl.SslContext sslCtx, boolean isStream, java.util.function.Consumer<io.netty.channel.ChannelHandlerContext> contextConsumer)
request - The requesthost - The hostport - The portsslCtx - The SslContext instanceisStream - Is the connection a stream connectioncontextConsumer - The logic to run once the channel is configured correctlyprotected io.netty.channel.nio.NioEventLoopGroup createEventLoopGroup(HttpClientConfiguration configuration, java.util.concurrent.ThreadFactory threadFactory)
NioEventLoopGroup for this client.configuration - The configurationthreadFactory - The thread factoryprotected io.netty.channel.ChannelFuture doConnect(io.netty.bootstrap.Bootstrap bootstrap,
                                                   java.lang.String host,
                                                   int port)
bootstrap - The bootstrap instancehost - The hostport - The portprotected io.netty.handler.ssl.SslContext buildSslContext(java.net.URI uriObject)
SslContext for the given URI if necessary.uriObject - The URISslContext instanceprotected void configureProxy(io.netty.channel.ChannelPipeline pipeline,
                              java.net.Proxy proxy)
pipeline - The pipelineproxy - The proxyprotected void configureProxy(io.netty.channel.ChannelPipeline pipeline,
                              java.net.Proxy.Type proxyType,
                              java.net.SocketAddress proxyAddress)
pipeline - The pipelineproxyType - The proxy typeproxyAddress - The proxy addressprotected <I,O> org.reactivestreams.Publisher<HttpResponse<O>> applyFilterToResponsePublisher(HttpRequest<?> parentRequest, HttpRequest<I> request, java.net.URI requestURI, java.util.concurrent.atomic.AtomicReference<HttpRequest> requestWrapper, org.reactivestreams.Publisher<HttpResponse<O>> responsePublisher)
I - The input typeO - The output typeparentRequest - The parent requestrequest - The requestrequestURI - The URI of the requestrequestWrapper - The request wrapperresponsePublisher - The response publisherPublisher for the responseprotected DefaultHttpClient.NettyRequestWriter buildNettyRequest(MutableHttpRequest request, java.net.URI requestURI, MediaType requestContentType, boolean permitsBody, @Nullable Argument<?> bodyType, java.util.function.Consumer<? super java.lang.Throwable> onError, boolean closeChannelAfterWrite) throws io.netty.handler.codec.http.multipart.HttpPostRequestEncoder.ErrorDataEncoderException
request - The requestrequestURI - The URI of the requestrequestContentType - The request content typepermitsBody - Whether permits bodybodyType - The body typeonError - Called when the body publisher encounters an errorcloseChannelAfterWrite - Whether to close the channel. For stream requests we don't close the channel until disposed of.DefaultHttpClient.NettyRequestWriterHttpPostRequestEncoder.ErrorDataEncoderException - if there is an encoder exceptionprotected void configureHttp2Ssl(DefaultHttpClient.HttpClientInitializer httpClientInitializer, @NonNull io.netty.channel.socket.SocketChannel ch, @NonNull io.netty.handler.ssl.SslContext sslCtx, java.lang.String host, int port, io.netty.handler.codec.http2.HttpToHttp2ConnectionHandler connectionHandler)
httpClientInitializer - The client initializerch - The channelsslCtx - The SSL contexthost - The hostport - The portconnectionHandler - The connection handlerprotected void configureHttp2ClearText(DefaultHttpClient.HttpClientInitializer httpClientInitializer, @NonNull io.netty.channel.socket.SocketChannel ch, @NonNull io.netty.handler.codec.http2.HttpToHttp2ConnectionHandler connectionHandler)
httpClientInitializer - The client initializerch - The channelconnectionHandler - The connection handler@NonNull protected io.netty.handler.codec.http2.HttpToHttp2ConnectionHandlerBuilder newHttp2ConnectionHandlerBuilder(@NonNull io.netty.handler.codec.http2.Http2Connection connection, @NonNull HttpClientConfiguration configuration, boolean stream)
HttpToHttp2ConnectionHandlerBuilder for the given HTTP/2 connection object and config.connection - The connectionconfiguration - The configurationstream - Whether this is a stream requestHttpToHttp2ConnectionHandlerBuilderpublic org.reactivestreams.Publisher<MutableHttpResponse<?>> proxy(@NonNull HttpRequest<?> request)
ProxyHttpClientproxy in interface ProxyHttpClientrequest - The request