public interface HttpClientResponse extends NettyInbound, HttpInfos, NettyContext
| Modifier and Type | Method and Description |
|---|---|
default HttpClientResponse |
addHandler(io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler with NettyContext.addHandlerFirst(io.netty.channel.ChannelHandler) if of type of
ChannelOutboundHandler otherwise with
NettyContext.addHandlerLast(io.netty.channel.ChannelHandler). |
HttpClientResponse |
addHandler(java.lang.String name,
io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler with NettyContext.addHandlerFirst(io.netty.channel.ChannelHandler) if of type of
ChannelOutboundHandler otherwise with
NettyContext.addHandlerLast(io.netty.channel.ChannelHandler). |
default HttpClientResponse |
addHandlerFirst(io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler to the beginning of the "user" ChannelPipeline,
that is just after the reactor-added codecs. |
HttpClientResponse |
addHandlerFirst(java.lang.String name,
io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler to the beginning of the "user" ChannelPipeline,
that is just after the reactor-added codecs. |
default HttpClientResponse |
addHandlerLast(io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler to the end of the "user" ChannelPipeline,
that is just before the reactor-added handlers (like NettyPipeline.ReactiveBridge. |
HttpClientResponse |
addHandlerLast(java.lang.String name,
io.netty.channel.ChannelHandler handler)
Add a
ChannelHandler to the end of the "user" ChannelPipeline,
that is just before the reactor-added handlers (like NettyPipeline.ReactiveBridge. |
HttpClientResponse |
onClose(java.lang.Runnable onClose)
Assign a
Runnable to be invoked when the channel is closed. |
default HttpClientResponse |
onReadIdle(long idleTimeout,
java.lang.Runnable onReadIdle)
Assign a
Runnable to be invoked when reads have become idle for the given
timeout. |
default reactor.core.publisher.Flux<io.netty.handler.codec.http.HttpContent> |
receiveContent()
Return a
Flux of HttpContent containing received chunks |
WebsocketInbound |
receiveWebsocket()
Unidirectional conversion to a
WebsocketInbound. |
default reactor.core.publisher.Mono<java.lang.Void> |
receiveWebsocket(java.util.function.BiFunction<? super WebsocketInbound,? super WebsocketOutbound,? extends Publisher<java.lang.Void>> websocketHandler)
|
reactor.core.publisher.Mono<java.lang.Void> |
receiveWebsocket(java.lang.String protocols,
java.util.function.BiFunction<? super WebsocketInbound,? super WebsocketOutbound,? extends Publisher<java.lang.Void>> websocketHandler)
|
java.lang.String[] |
redirectedFrom()
Return the previous redirections or empty array
|
HttpClientResponse |
removeHandler(java.lang.String name)
Remove a named handler if present and return this context
|
HttpClientResponse |
replaceHandler(java.lang.String name,
io.netty.channel.ChannelHandler handler)
Replace a named handler if present and return this context.
|
io.netty.handler.codec.http.HttpHeaders |
responseHeaders()
Return response HTTP headers.
|
io.netty.handler.codec.http.HttpResponseStatus |
status() |
attr, context, context, receive, receiveObject, remoteAddresscookies, isKeepAlive, isWebsocket, method, path, uri, versionaddress, channel, dispose, isDisposed, isPersistent, markPersistent, onClosedefault HttpClientResponse addHandlerFirst(io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler to the beginning of the "user" ChannelPipeline,
that is just after the reactor-added codecs. If a handler with a similar name already
exists, this operation is skipped.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ].
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandlerFirst in interface NettyContexthandler - handler instanceHttpClientResponse addHandlerFirst(java.lang.String name, io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler to the beginning of the "user" ChannelPipeline,
that is just after the reactor-added codecs. If a handler with a similar name already
exists, this operation is skipped.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandlerFirst in interface NettyContextname - handler namehandler - handler instancedefault HttpClientResponse addHandlerLast(io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler to the end of the "user" ChannelPipeline,
that is just before the reactor-added handlers (like NettyPipeline.ReactiveBridge.
If a handler with a similar name already exists, this operation is skipped.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandlerLast in interface NettyContexthandler - handler instanceHttpClientResponse addHandlerLast(java.lang.String name, io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler to the end of the "user" ChannelPipeline,
that is just before the reactor-added handlers (like NettyPipeline.ReactiveBridge.
If a handler with a similar name already exists, this operation is skipped.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandlerLast in interface NettyContextname - handler namehandler - handler instancedefault HttpClientResponse addHandler(io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler with NettyContext.addHandlerFirst(io.netty.channel.ChannelHandler) if of type of
ChannelOutboundHandler otherwise with
NettyContext.addHandlerLast(io.netty.channel.ChannelHandler). Implementation may add more auto handling in particular
HTTP based context will prepend an HttpContent body extractor.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandler in interface NettyContexthandler - handler instanceHttpClientResponse addHandler(java.lang.String name, io.netty.channel.ChannelHandler handler)
NettyContextChannelHandler with NettyContext.addHandlerFirst(io.netty.channel.ChannelHandler) if of type of
ChannelOutboundHandler otherwise with
NettyContext.addHandlerLast(io.netty.channel.ChannelHandler). Implementation may add more auto handling in particular
HTTP based context will prepend an HttpContent body extractor.
[ [reactor codecs], [<- user FIRST HANDLERS added here, user LAST HANDLERS added here ->], [reactor handlers] ]
If effectively added, the handler will be safely removed when the channel is made inactive (pool release).
addHandler in interface NettyContextname - handler namehandler - handler instanceHttpClientResponse removeHandler(java.lang.String name)
NettyContextremoveHandler in interface NettyContextname - handler nameHttpClientResponse replaceHandler(java.lang.String name, io.netty.channel.ChannelHandler handler)
NettyContextRuntimeException will be thrown.
Note: if the new handler is of different type, dependent handling like
the "extractor" introduced via HTTP-based NettyContext.addHandler(io.netty.channel.ChannelHandler) might not
expect/support the new messages type.
replaceHandler in interface NettyContextname - handler nameHttpClientResponse onClose(java.lang.Runnable onClose)
NettyContextRunnable to be invoked when the channel is closed.onClose in interface NettyContextonClose - the close event handlerdefault HttpClientResponse onReadIdle(long idleTimeout, java.lang.Runnable onReadIdle)
NettyInboundRunnable to be invoked when reads have become idle for the given
timeout. This replaces any previously set idle callback.onReadIdle in interface NettyInboundidleTimeout - the idle timeoutonReadIdle - the idle timeout handlerdefault reactor.core.publisher.Flux<io.netty.handler.codec.http.HttpContent> receiveContent()
Flux of HttpContent containing received chunksFlux of HttpContent containing received chunksWebsocketInbound receiveWebsocket()
WebsocketInbound.
receive operations are invoked on handshake success, otherwise connection wasn't
upgraded by the server and the returned WebsocketInbound fails.WebsocketInbound completing when upgrade is confirmeddefault reactor.core.publisher.Mono<java.lang.Void> receiveWebsocket(java.util.function.BiFunction<? super WebsocketInbound,? super WebsocketOutbound,? extends Publisher<java.lang.Void>> websocketHandler)
WebsocketInbound, WebsocketOutbound and a
closing Publisher. Mono and Callback are invoked on handshake success,
otherwise the returned Mono fails.websocketHandler - the in/out handler for ws transportMono completing when upgrade is confirmedreactor.core.publisher.Mono<java.lang.Void> receiveWebsocket(java.lang.String protocols,
java.util.function.BiFunction<? super WebsocketInbound,? super WebsocketOutbound,? extends Publisher<java.lang.Void>> websocketHandler)
WebsocketInbound, WebsocketOutbound and a
closing Publisher. Mono and Callback are invoked on handshake success,
otherwise the returned Mono fails.protocols - optional sub-protocolwebsocketHandler - the in/out handler for ws transportMono completing when upgrade is confirmedjava.lang.String[] redirectedFrom()
io.netty.handler.codec.http.HttpHeaders responseHeaders()
io.netty.handler.codec.http.HttpResponseStatus status()