Top Description Fields Constructors Methods
reactor.netty5.http.server

pack-priv final Class Http2StreamBridgeServerHandler

extends ChannelHandlerAdapter
implements FutureContextListener<Channel, Void>
Class Inheritance
All Implemented Interfaces
io.netty5.util.concurrent.FutureContextListener
Imports
java.net.SocketAddress, java.util.Optional, java.util.function.BiFunction, .BiPredicate, io.netty5.buffer.Buffer, io.netty5.channel.Channel, .ChannelHandlerAdapter, .ChannelHandlerContext, io.netty5.handler.codec.http.DefaultHttpContent, .HttpObject, .HttpRequest, .LastHttpContent, io.netty5.handler.codec.http2.Http2StreamFrameToHttpObjectCodec, io.netty5.handler.ssl.SslHandler, io.netty5.util.Resource, io.netty5.util.concurrent.Future, .FutureContextListener, reactor.core.publisher.Mono, reactor.netty5.Connection, .ConnectionObserver, reactor.netty5.http.logging.HttpMessageArgProviderFactory, .HttpMessageLogFactory, reactor.util.annotation.Nullable

This handler is intended to work together with Http2StreamFrameToHttpObjectCodec it converts the outgoing messages into objects expected by Http2StreamFrameToHttpObjectCodec.
Author
Violeta Georgieva

Field Summary

Modifier and TypeField and Description
pack-priv final BiPredicate<HttpServerRequest, HttpServerResponse>
pack-priv final HttpServerFormDecoderProvider
pack-priv final BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo>
pack-priv final HttpMessageLogFactory
pack-priv final ConnectionObserver
pack-priv final BiFunction<? super Mono<Void>, ? super Connection, ? extends Mono<Void>>
pack-priv boolean
pendingResponse

Flag to indicate if a request is not yet fully responded.

pack-priv SocketAddress
pack-priv Boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
channelRead(ChannelHandlerContext ctx, Object msg)

Overrides default io.netty5.channel.ChannelHandler.channelRead.

Invoked when the current Channel has read a message from the peer.
public void
handlerAdded(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.
public void
operationComplete(Channel channel, Future<? extends Void>
the source Future which called this callback
future
)

Implements io.netty5.util.concurrent.FutureContextListener.operationComplete.

Invoked when the operation associated with the Future has been completed.
public Future<Void>
write(ChannelHandlerContext
the ChannelHandlerContext for which the write operation is made
ctx
,
Object
the message to write
msg
)

Overrides default io.netty5.channel.ChannelHandler.write.

Called once a write operation is made.

Field Detail

compressback to summary
pack-priv final BiPredicate<HttpServerRequest, HttpServerResponse> compress
formDecoderProviderback to summary
pack-priv final HttpServerFormDecoderProvider formDecoderProvider
forwardedHeaderHandlerback to summary
pack-priv final BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo> forwardedHeaderHandler
httpMessageLogFactoryback to summary
pack-priv final HttpMessageLogFactory httpMessageLogFactory
listenerback to summary
pack-priv final ConnectionObserver listener
mapHandleback to summary
pack-priv final BiFunction<? super Mono<Void>, ? super Connection, ? extends Mono<Void>> mapHandle
pendingResponseback to summary
pack-priv boolean pendingResponse

Flag to indicate if a request is not yet fully responded.

remoteAddressback to summary
pack-priv SocketAddress remoteAddress
securedback to summary
pack-priv Boolean secured

Constructor Detail

Http2StreamBridgeServerHandlerback to summary
pack-priv Http2StreamBridgeServerHandler(BiPredicate<HttpServerRequest, HttpServerResponse> compress, HttpServerFormDecoderProvider formDecoderProvider, BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo> forwardedHeaderHandler, HttpMessageLogFactory httpMessageLogFactory, ConnectionObserver listener, BiFunction<? super Mono<Void>, ? super Connection, ? extends Mono<Void>> mapHandle)

Method Detail

channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg)

Overrides default io.netty5.channel.ChannelHandler.channelRead.

Doc from io.netty5.channel.ChannelHandler.channelRead.

Invoked when the current Channel has read a message from the peer.

Annotations
@Override
handlerAddedback to summary
public void handlerAdded(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.handlerAdded.

Doc from io.netty5.channel.ChannelHandler.handlerAdded.

Gets called after the ChannelHandler was added to the actual context and it's ready to handle events.

Annotations
@Override
operationCompleteback to summary
public void operationComplete(Channel channel, Future<? extends Void> future)

Implements io.netty5.util.concurrent.FutureContextListener.operationComplete.

Doc from io.netty5.util.concurrent.FutureContextListener.operationComplete.

Invoked when the operation associated with the Future has been completed.

Parameters
future:Future<? extends Void>

the source Future which called this callback

Annotations
@Override
writeback to summary
public Future<Void> write(ChannelHandlerContext ctx, Object msg)

Overrides default io.netty5.channel.ChannelHandler.write.

Doc from io.netty5.channel.ChannelHandler.write.

Called once a write operation is made. The write operation will write the messages through the ChannelPipeline. Those are then ready to be flushed to the actual Channel once Channel#flush() is called.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the write operation is made

msg:Object

the message to write

Returns:Future<Void>

the Future which will be notified once the operation completes.

Annotations
@Override