Class Http3MockServerHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
org.mockserver.netty.http3.Http3MockServerHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class Http3MockServerHandler extends io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
HTTP/3 request stream handler that bridges incoming QUIC requests into MockServer's standard request-processing pipeline (expectation matching, actions, recording, proxy forwarding).

Each QUIC bidirectional stream gets its own instance. The handler accumulates the request headers and body data frames, then routes the resulting HttpRequest through the same HttpState and HttpActionHandler used by HTTP/1.1 and HTTP/2.

  • Nested Class Summary

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

    io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Http3MockServerHandler(Configuration configuration, MockServerLogger mockServerLogger, HttpState httpState, HttpActionHandler httpActionHandler, Metrics metrics)
     
    Http3MockServerHandler(Configuration configuration, MockServerLogger mockServerLogger, HttpState httpState, HttpActionHandler httpActionHandler, Metrics metrics, McpRequestProcessor mcpRequestProcessor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     
    protected void
    channelInputClosed(io.netty.channel.ChannelHandlerContext ctx)
     
    protected void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http3.Http3DataFrame dataFrame)
     
    protected void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http3.Http3HeadersFrame headersFrame)
     
    void
    exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    void
    handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
     

    Methods inherited from class io.netty.handler.codec.http3.Http3RequestStreamInboundHandler

    channelRead, channelRead, controlStream, handleHttp3Exception, handleQuicException, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, isSharable

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded
  • Constructor Details

  • Method Details

    • channelRead

      protected void channelRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http3.Http3HeadersFrame headersFrame)
      Specified by:
      channelRead in class io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
    • channelRead

      protected void channelRead(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http3.Http3DataFrame dataFrame)
      Specified by:
      channelRead in class io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • channelInputClosed

      protected void channelInputClosed(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelInputClosed in class io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
    • handlerRemoved

      public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerRemoved in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerRemoved in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception
    • exceptionCaught

      public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class io.netty.handler.codec.http3.Http3RequestStreamInboundHandler