Top Description Inners Fields Constructors Methods
reactor.netty.http.client

pack-priv Class HttpClientOperations

extends HttpOperations<NettyInbound, NettyOutbound>
implements HttpClientResponse, HttpClientRequest
Class Inheritance
All Implemented Interfaces
reactor.netty.http.client.HttpClientRequest, reactor.netty.http.client.HttpClientInfos, reactor.netty.http.HttpInfos, reactor.netty.http.client.HttpClientResponse
Known Direct Subclasses
reactor.netty.http.client.WebsocketClientOperations
Imports
java.net.InetSocketAddress, .URI, .URISyntaxException, java.nio.channels.ClosedChannelException, java.time.Duration, java.util.ArrayList, .Collections, .List, .Map, .Objects, .Set, java.util.concurrent.TimeUnit, java.util.function.BiConsumer, .BiPredicate, .Consumer, .Supplier, io.netty.buffer.ByteBuf, .ByteBufAllocator, .ByteBufHolder, .CompositeByteBuf, .Unpooled, io.netty.channel.ChannelFuture, .ChannelHandler, .ChannelHandlerContext, io.netty.handler.codec.compression.ZlibCodecFactory, io.netty.handler.codec.http.DefaultFullHttpRequest, .DefaultHttpRequest, .FullHttpResponse, .HttpConstants, .HttpHeaderNames, .HttpHeaders, .HttpMessage, .HttpMethod, .HttpObjectAggregator, .HttpRequest, .HttpResponse, .HttpResponseStatus, .HttpUtil, .HttpVersion, .LastHttpContent, io.netty.handler.codec.http.cookie.ClientCookieDecoder, .ClientCookieEncoder, .Cookie, io.netty.handler.codec.http.multipart.DefaultHttpDataFactory, .HttpDataFactory, .HttpPostRequestEncoder, io.netty.handler.codec.http.websocketx.extensions.WebSocketClientExtensionHandler, io.netty.handler.codec.http.websocketx.extensions.compression.DeflateFrameClientExtensionHandshaker, .PerMessageDeflateClientExtensionHandshaker, io.netty.handler.codec.http2.Http2StreamChannel, io.netty.handler.stream.ChunkedWriteHandler, io.netty.handler.timeout.ReadTimeoutHandler, io.netty.util.ReferenceCountUtil, org.reactivestreams.Publisher, .Subscription, reactor.core.CoreSubscriber, .Disposable, .Exceptions, reactor.core.publisher.Flux, .Mono, .Operators, .Sinks, reactor.netty.Connection, .ConnectionObserver, .FutureMono, .NettyInbound, .NettyOutbound, .NettyPipeline, reactor.netty.channel.AbortedException, .ChannelOperations, reactor.netty.http.Cookies, .HttpOperations, reactor.netty.http.logging.HttpMessageArgProviderFactory, .HttpMessageLogFactory, reactor.util.Logger, .Loggers, reactor.util.annotation.Nullable, reactor.util.context.ContextView

Conversion between Netty types and Reactor types (HttpOperations.
Authors
Stephane Maldini, Simon Baslé

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final ClientCookieDecoder
pack-priv final ClientCookieEncoder
pack-priv final List<Cookie>
pack-priv static final Supplier<String>[]
pack-priv BiPredicate<HttpClientRequest, HttpClientResponse>
pack-priv static final String
pack-priv boolean
pack-priv final boolean
pack-priv static final Logger
pack-priv static final int
pack-priv final HttpRequest
pack-priv String
pack-priv HttpHeaders
pack-priv Supplier<String>[]
pack-priv RedirectClientException
pack-priv BiConsumer<HttpHeaders, HttpClientRequest>
pack-priv Consumer<HttpClientRequest>
pack-priv final HttpHeaders
pack-priv String
pack-priv volatile HttpClientOperations.ResponseState
pack-priv Duration
pack-priv boolean
pack-priv boolean
pack-priv final Sinks.One<HttpHeaders>
pack-priv volatile Throwable

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public HttpClientRequest
addCookie(Cookie cookie)

Implements reactor.netty.http.client.HttpClientRequest.addCookie.

Add an outbound cookie.
public HttpClientOperations
public HttpClientOperations
public HttpClientOperations
addHandlerFirst(ChannelHandler
handler instance
handler
)

Overrides default reactor.netty.Connection.addHandlerFirst.

Add a ChannelHandler to the beginning of the "user" io.netty.channel.ChannelPipeline, that is just after the reactor-added codecs.
public HttpClientOperations
addHandlerFirst(String
handler name
name
,
ChannelHandler
handler instance
handler
)

Overrides default reactor.netty.Connection.addHandlerFirst.

Add a ChannelHandler to the beginning of the "user" io.netty.channel.ChannelPipeline, that is just after the reactor-added codecs.
public HttpClientOperations
addHandlerLast(ChannelHandler
handler instance
handler
)

Overrides default reactor.netty.Connection.addHandlerLast.

Add a ChannelHandler to the end of the "user" io.netty.channel.ChannelPipeline, that is just before the reactor-added handlers like NettyPipeline#ReactiveBridge.
public HttpClientOperations
addHandlerLast(String
handler name
name
,
ChannelHandler
handler instance
handler
)

Overrides default reactor.netty.Connection.addHandlerLast.

Add a ChannelHandler to the end of the "user" io.netty.channel.ChannelPipeline, that is just before the reactor-added handlers like NettyPipeline#ReactiveBridge.
public HttpClientRequest
addHeader(CharSequence
header name
name
,
CharSequence
header value
value
)

Implements reactor.netty.http.client.HttpClientRequest.addHeader.

Add an outbound http header, appending the value if the header is already set.
pack-priv static Throwable
public InetSocketAddress
address()

Overrides default reactor.netty.DisposableChannel.address.

When on the server, returns the bind address, when on the client, returns the remote address.
protected void
afterInboundComplete()

Overrides reactor.netty.channel.ChannelOperations.afterInboundComplete.

React after inbound completion (last packet).
protected void
protected void
public void
chunkedTransfer(boolean chunked)

public Map<CharSequence, Set<Cookie>>
cookies()

Implements reactor.netty.http.HttpInfos.cookies.

Returns resolved HTTP cookies.
public ContextView
currentContextView()

Implements reactor.netty.http.client.HttpClientInfos.currentContextView.

Return the current ContextView associated with the Mono/Flux exposed via HttpClient.ResponseReceiver#response() or related terminating API.
pack-priv void
public final String
fullPath()

Implements reactor.netty.http.HttpInfos.fullPath.

Returns the decoded path portion from the uri().
pack-priv final HttpRequest
public HttpClientRequest
header(CharSequence
headers key
name
,
CharSequence
header value
value
)

Implements reactor.netty.http.client.HttpClientRequest.header.

Set an outbound header, replacing any pre-existing value.
public HttpClientRequest
headers(HttpHeaders
a netty headers map
headers
)

Implements reactor.netty.http.client.HttpClientRequest.headers.

Set outbound headers from the passed headers.
protected boolean
public boolean
isFollowRedirect()

Implements reactor.netty.http.client.HttpClientRequest.isFollowRedirect.

Return true if redirected will be followed.
public boolean
isKeepAlive()

Implements reactor.netty.http.HttpInfos.isKeepAlive.

Is the request keep alive.
public boolean
isWebsocket()

Overrides reactor.netty.http.HttpOperations.isWebsocket.

Implements reactor.netty.http.HttpInfos.isWebsocket.

Returns true if websocket connection (upgraded).
public HttpMethod
method()

Implements reactor.netty.http.HttpInfos.method.

Returns the resolved request method (HTTP 1.1 etc.).
protected HttpMessage
pack-priv final boolean
public final HttpClientOperations
onDispose(Disposable
the close event handler
onDispose
)

Overrides reactor.netty.channel.ChannelOperations.onDispose.

Overrides default reactor.netty.Connection.onDispose.

Assigns a Disposable to be invoked when the channel is closed.
protected void
protected void
onInboundCancel()

Overrides reactor.netty.channel.ChannelOperations.onInboundCancel.

React on inbound cancel (receive() subscriber cancelled).
protected void
onInboundClose()

Overrides reactor.netty.channel.ChannelOperations.onInboundClose.

React on inbound close (channel closed prematurely).
protected void
onInboundNext(ChannelHandlerContext
the context
ctx
,
Object
the read payload
msg
)

Overrides reactor.netty.channel.ChannelOperations.onInboundNext.

React on inbound Channel#read.
protected void
onOutboundComplete()

Overrides reactor.netty.channel.ChannelOperations.onOutboundComplete.

React on inbound/outbound completion (last packet).
protected void
onOutboundError(Throwable
the Throwable cause
err
)

Overrides reactor.netty.channel.ChannelOperations.onOutboundError.

React on inbound/outbound error.
protected final void
protected void
onWritabilityChanged()

Overrides reactor.netty.channel.ChannelOperations.onWritabilityChanged.

React on channel unwritability event while the http client request is being written.
protected HttpMessage
outboundHttpMessage()

Implements abstract reactor.netty.http.HttpOperations.outboundHttpMessage.

Outbound Netty HttpMessage.
public String[]
redirectedFrom()

Implements reactor.netty.http.client.HttpClientInfos.redirectedFrom.

Return the previous redirections or empty array.
pack-priv void
public HttpClientOperations
removeHandler(String
handler name
name
)

Overrides default reactor.netty.Connection.removeHandler.

Remove a named handler if present and return this context.
public HttpClientOperations
replaceHandler(String
handler name
name
,
ChannelHandler handler)

Overrides default reactor.netty.Connection.replaceHandler.

Replace a named handler if present and return this context.
public HttpHeaders
requestHeaders()

Implements reactor.netty.http.client.HttpClientInfos.requestHeaders.

Return outbound headers to be sent.
public String
resourceUrl()

Implements reactor.netty.http.client.HttpClientInfos.resourceUrl.

Return the fully qualified URL of the requested resource.
public HttpHeaders
public HttpClientRequest
responseTimeout(Duration
the maximum duration allowed between each network-level read operations (resolution: ms).
maxReadOperationInterval
)

Implements reactor.netty.http.client.HttpClientRequest.responseTimeout.

Specifies the maximum duration allowed between each network-level read operation while reading a given response (resolution: ms).
public NettyOutbound
send(Publisher<? extends ByteBuf>
the dataStream publishing OUT items to write on this channel
source
)

Overrides reactor.netty.http.HttpOperations.send.

Overrides default reactor.netty.NettyOutbound.send.

Sends data to the peer, listens for any error on write and closes on terminal signal (complete|error).
pack-priv final Mono<Void>
send()

pack-priv final void
public HttpResponseStatus
status()

Implements reactor.netty.http.client.HttpClientResponse.status.

Return the resolved HTTP Response Status.
public Mono<HttpHeaders>
public final String
uri()

Implements reactor.netty.http.HttpInfos.uri.

Returns the resolved target address.
public final HttpVersion
version()

Implements reactor.netty.http.HttpInfos.version.

Returns the resolved request version (HTTP 1.1 etc).
pack-priv final URI
public HttpClientOperations
withConnection(Consumer<? super Connection>
connection callback
withConnection
)

Overrides reactor.netty.channel.ChannelOperations.withConnection.

Implements reactor.netty.NettyInbound.withConnection, reactor.netty.NettyOutbound.withConnection.

Calls the passed callback with a Connection to operate on the underlying Channel state.
pack-priv final void
withWebsocketSupport(WebsocketClientSpec websocketClientSpec, boolean compress)

protected Throwable
Inherited from reactor.netty.http.HttpOperations:
asDebugLogMessagehasSentBodyhasSentHeadershttpMessageLogFactoryinitShortIdmarkSentBodymarkSentHeaderAndBodymarkSentHeadersrequestIdresolvePathsendFilesendObjectthentoString