Class FrontendMetricsHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
google.registry.proxy.handler.FrontendMetricsHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

public class FrontendMetricsHandler extends io.netty.channel.ChannelDuplexHandler
Handler that records metrics for a fronend channel.

This handler is added before the RelayHandler in the frontend protocol handler provider method. Outbound messages encounter this first before being handed over to protocol-specific handlers. Inbound messages are first constructed (from plain bytes) by preceding handlers and then related metrics are instrumented in this handler.

  • Nested Class Summary Link icon

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler Link icon

    io.netty.channel.ChannelHandler.Sharable
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    void
    channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
     

    Methods inherited from class io.netty.channel.ChannelDuplexHandler Link icon

    bind, close, connect, deregister, disconnect, flush, read

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter Link icon

    channelActive, channelInactive, channelReadComplete, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter Link icon

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler Link icon

    handlerAdded, handlerRemoved
  • Method Details Link icon

    • channelRegistered Link icon

      public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelRegistered in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRegistered in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelRead Link icon

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • write Link icon

      public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)
      Specified by:
      write in interface io.netty.channel.ChannelOutboundHandler
      Overrides:
      write in class io.netty.channel.ChannelDuplexHandler