Top Fields Constructors Methods
reactor.netty5.http.server

pack-priv abstract Class AbstractHttpServerMetricsHandler

extends ChannelHandlerAdapter
Class Inheritance
Known Direct Subclasses
reactor.netty5.http.server.ContextAwareHttpServerMetricsHandler, reactor.netty5.http.server.HttpServerMetricsHandler, reactor.netty5.http.server.MicrometerHttpServerMetricsHandler
Imports
io.netty5.buffer.Buffer, io.netty5.channel.ChannelHandlerAdapter, .ChannelHandlerContext, io.netty5.handler.codec.http.HttpContent, .HttpRequest, .HttpResponse, .HttpResponseStatus, .LastHttpContent, io.netty5.handler.codec.http2.Http2StreamChannel, io.netty5.util.concurrent.Future, reactor.netty5.channel.ChannelOperations, reactor.util.Logger, .Loggers, reactor.util.annotation.Nullable, java.time.Duration, java.util.function.Function

Author
Violeta Georgieva
Since
1.0.8

Field Summary

Modifier and TypeField and Description
pack-priv long
pack-priv long
pack-priv long
pack-priv long
private static final Logger
pack-priv final Function<String, String>

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
public void
public void
channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause)

Overrides default io.netty5.channel.ChannelHandler.channelExceptionCaught.

Gets called if a Throwable was thrown when handling inbound events.
public void
channelInactive(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.
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.
private long
protected void
protected void
protected abstract HttpServerMetricsRecorder
protected void
protected void
protected void
protected void
protected void
protected void
protected void
startWrite(HttpServerOperations ops, String path, String method, String status)

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

dataReceivedback to summary
pack-priv long dataReceived
dataReceivedTimeback to summary
pack-priv long dataReceivedTime
dataSentback to summary
pack-priv long dataSent
dataSentTimeback to summary
pack-priv long dataSentTime
logback to summary
private static final Logger log
uriTagValueback to summary
pack-priv final Function<String, String> uriTagValue

Constructor Detail

AbstractHttpServerMetricsHandlerback to summary
protected AbstractHttpServerMetricsHandler(Function<String, String> uriTagValue)
AbstractHttpServerMetricsHandlerback to summary
protected AbstractHttpServerMetricsHandler(AbstractHttpServerMetricsHandler copy)

Method Detail

channelActiveback to summary
public void channelActive(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.channelActive.

Doc from io.netty5.channel.ChannelHandler.channelActive.

The Channel of the ChannelHandlerContext is now active

Annotations
@Override
channelExceptionCaughtback to summary
public void channelExceptionCaught(ChannelHandlerContext ctx, Throwable cause)

Overrides default io.netty5.channel.ChannelHandler.channelExceptionCaught.

Doc from io.netty5.channel.ChannelHandler.channelExceptionCaught.

Gets called if a Throwable was thrown when handling inbound events.

Annotations
@Override
channelInactiveback to summary
public void channelInactive(ChannelHandlerContext ctx)

Overrides default io.netty5.channel.ChannelHandler.channelInactive.

Doc from io.netty5.channel.ChannelHandler.channelInactive.

The Channel of the ChannelHandlerContext was registered is now inactive and reached its end of lifetime.

Annotations
@Override
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
extractProcessedDataFromBufferback to summary
private long extractProcessedDataFromBuffer(Object msg)
recordActiveConnectionback to summary
protected void recordActiveConnection(HttpServerOperations ops)
recordClosedStreamback to summary
protected void recordClosedStream(HttpServerOperations ops)
recorderback to summary
protected abstract HttpServerMetricsRecorder recorder()
recordExceptionback to summary
protected void recordException(HttpServerOperations ops, String path)
recordInactiveConnectionback to summary
protected void recordInactiveConnection(HttpServerOperations ops)
recordOpenStreamback to summary
protected void recordOpenStream(HttpServerOperations ops)
recordReadback to summary
protected void recordRead(HttpServerOperations ops, String path, String method)
recordWriteback to summary
protected void recordWrite(HttpServerOperations ops, String path, String method, String status)
startReadback to summary
protected void startRead(HttpServerOperations ops, String path, String method)
startWriteback to summary
protected void startWrite(HttpServerOperations ops, String path, String method, String status)
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