Class PendingStreamHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
com.hypixel.hytale.server.core.io.stream.PendingStreamHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class PendingStreamHandler extends io.netty.channel.ChannelInboundHandlerAdapter
Handler for new QUIC streams that have not yet identified their type. The first packet on the stream must be a StreamOpen packet, which identifies the stream type and triggers the appropriate handler setup.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    Creates a new PendingStreamHandler using the global StreamManager singleton.
    PendingStreamHandler(PacketHandler packetHandler, StreamManager streamManager)
    Creates a new PendingStreamHandler with an explicit StreamManager.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    void
    exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    handlerAdded, handlerRemoved, isSharable

    Methods inherited from class Object

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

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • PendingStreamHandler

      public PendingStreamHandler(@Nonnull PacketHandler packetHandler)
      Creates a new PendingStreamHandler using the global StreamManager singleton.
      Parameters:
      packetHandler - The main packet handler for this connection
    • PendingStreamHandler

      public PendingStreamHandler(@Nonnull PacketHandler packetHandler, @Nonnull StreamManager streamManager)
      Creates a new PendingStreamHandler with an explicit StreamManager.
      Parameters:
      packetHandler - The main packet handler for this connection
      streamManager - The stream manager to use for handler lookup
  • Method Details

    • channelRead

      public void channelRead(@Nonnull io.netty.channel.ChannelHandlerContext ctx, @Nonnull Object msg)
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
    • exceptionCaught

      public void exceptionCaught(@Nonnull io.netty.channel.ChannelHandlerContext ctx, @Nonnull 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.channel.ChannelInboundHandlerAdapter
    • channelInactive

      public void channelInactive(@Nonnull 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