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

pack-priv abstract Class AbstractHttpClientMetricsHandler

extends ChannelDuplexHandler
Class Inheritance
Known Direct Subclasses
reactor.netty.http.client.ContextAwareHttpClientMetricsHandler, reactor.netty.http.client.HttpClientMetricsHandler, reactor.netty.http.client.MicrometerHttpClientMetricsHandler
Imports
io.netty.buffer.ByteBuf, .ByteBufHolder, io.netty.channel.Channel, .ChannelDuplexHandler, .ChannelHandlerContext, .ChannelPromise, io.netty.handler.codec.http.HttpRequest, .HttpResponse, .LastHttpContent, reactor.netty.channel.ChannelOperations, reactor.util.annotation.Nullable, reactor.util.context.ContextView, reactor.util.Logger, .Loggers, java.net.SocketAddress, java.time.Duration, java.util.function.Function

ChannelDuplexHandler for handling HttpClient metrics.
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
pack-priv int
private static final Logger
pack-priv String
pack-priv String
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
public void
private void
private long
protected abstract HttpClientMetricsRecorder
protected void
protected void
protected void
protected void
private String
protected void
protected void
public void
write(ChannelHandlerContext
the ChannelHandlerContext for which the write operation is made
ctx
,
Object
the message to write
msg
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Overrides io.netty.channel.ChannelDuplexHandler.write.

Implements io.netty.channel.ChannelOutboundHandler.write.

Calls ChannelHandlerContext#write(Object, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
Inherited from io.netty.channel.ChannelDuplexHandler:
bindcloseconnectderegisterdisconnectflushread

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
lastReadSeqback to summary
pack-priv int lastReadSeq
lastWriteSeqback to summary
pack-priv int lastWriteSeq
logback to summary
private static final Logger log
methodback to summary
pack-priv String method
pathback to summary
pack-priv String path
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

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

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Implements io.netty.channel.ChannelInboundHandler.channelRead.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Calls ChannelHandlerContext#fireChannelRead(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
exceptionCaughtback to summary
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught.

Implements io.netty.channel.ChannelHandler.exceptionCaught, io.netty.channel.ChannelInboundHandler.exceptionCaught.

Doc from io.netty.channel.ChannelHandler.exceptionCaught.

Gets called if a Throwable was thrown.

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(Channel channel)
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)
writeback to summary
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)

Overrides io.netty.channel.ChannelDuplexHandler.write.

Implements io.netty.channel.ChannelOutboundHandler.write.

Doc from io.netty.channel.ChannelDuplexHandler.write.

Calls ChannelHandlerContext#write(Object, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Parameters
ctx:ChannelHandlerContext

Doc from io.netty.channel.ChannelOutboundHandler.write.

the ChannelHandlerContext for which the write operation is made

msg:Object

Doc from io.netty.channel.ChannelOutboundHandler.write.

the message to write

promise:ChannelPromise

Doc from io.netty.channel.ChannelOutboundHandler.write.

the ChannelPromise to notify once the operation completes

Annotations
@Override
@SuppressWarnings:FutureReturnValueIgnored