Interface PacketFactory<T extends Packet,H extends PacketCodecHelper>

Type Parameters:
T - the packet type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PacketFactory<T extends Packet,H extends PacketCodecHelper>
Factory for constructing Packets.
  • Method Summary

    Modifier and Type
    Method
    Description
    construct(io.netty.buffer.ByteBuf buf, H codecHelper)
    Constructs a new Packet.
  • Method Details

    • construct

      T construct(io.netty.buffer.ByteBuf buf, H codecHelper)
      Constructs a new Packet.
      Parameters:
      buf - the input buffer
      codecHelper - the codec helper
      Returns:
      a new packet from the input