Top Fields Constructors Methods
reactor.netty5.http.client

pack-priv abstract Class AbstractHttpClientMetricsHandler

extends ChannelHandlerAdapter
Class Inheritance
Known Direct Subclasses
reactor.netty5.http.client.ContextAwareHttpClientMetricsHandler, reactor.netty5.http.client.HttpClientMetricsHandler, reactor.netty5.http.client.MicrometerHttpClientMetricsHandler
Imports
io.netty5.buffer.Buffer, io.netty5.channel.Channel, .ChannelHandlerAdapter, .ChannelHandlerContext, io.netty5.handler.codec.http.HttpContent, .HttpRequest, .HttpResponse, .LastHttpContent, io.netty5.util.concurrent.Future, reactor.netty5.channel.ChannelOperations, reactor.util.annotation.Nullable, reactor.util.context.ContextView, reactor.util.Logger, .Loggers, java.net.SocketAddress, java.time.Duration, java.util.function.Function

Author
Violeta Georgieva
Since
1.0.8

Field Summary

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

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
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
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 void
private long
protected abstract HttpClientMetricsRecorder
protected void
protected void
protected void
protected void
private String
protected void
protected void
startWrite(HttpRequest msg, Channel channel, ContextView contextView)

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

contextViewback to summary
pack-priv ContextView contextView
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
flagsback to summary
pack-priv int flags
logback to summary
private static final Logger log
methodback to summary
pack-priv String method
pathback to summary
pack-priv String path
REQUEST_SENTback to summary
pack-priv static final int REQUEST_SENT
RESPONSE_RECEIVEDback to summary
pack-priv static final int RESPONSE_RECEIVED
statusback to summary
pack-priv String status
uriTagValueback to summary
pack-priv final Function<String, String> uriTagValue

Constructor Detail

AbstractHttpClientMetricsHandlerback to summary
protected AbstractHttpClientMetricsHandler(Function<String, String> uriTagValue)
AbstractHttpClientMetricsHandlerback to summary
protected AbstractHttpClientMetricsHandler(AbstractHttpClientMetricsHandler copy)

Method Detail

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
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
extractDetailsFromHttpRequestback to summary
private void extractDetailsFromHttpRequest(ChannelHandlerContext ctx, HttpRequest request)
extractProcessedDataFromBufferback to summary
private long extractProcessedDataFromBuffer(Object msg)
recorderback to summary
protected abstract HttpClientMetricsRecorder recorder()
recordExceptionback to summary
protected void recordException(ChannelHandlerContext ctx)
recordReadback to summary
protected void recordRead(SocketAddress address)
recordWriteback to summary
protected void recordWrite(SocketAddress address)
resetback to summary
protected void reset()
resolveUriback to summary
private String resolveUri(ChannelHandlerContext ctx)
startReadback to summary
protected void startRead(HttpResponse msg)
startWriteback to summary
protected void startWrite(HttpRequest msg, Channel channel, ContextView contextView)
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