Код: Выделить всё
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
...
//where we do our metering part here:
meterRegistry.timer(
"processing.handler.command.duration",
"command_name", commandName,
"success", Boolean.toString(true)
).record(duration, java.util.concurrent.TimeUnit.MILLISECONDS);
...
}
Код: Выделить всё
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
...
}
Как передать значения между ChannelRead иExceptionCaught?
Подробнее здесь: https://stackoverflow.com/questions/792 ... oundhandle
Мобильная версия