Interface PacketFactory<T extends Packet>

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>
Factory for constructing Packets.
  • Method Summary

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

    • construct

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