Interface PacketFactory<D extends PacketData<?>>

    • Method Summary

      Modifier and Type Method Description
      boolean canHandle​(byte[] data)
      Checks whether this PacketFactory is able to handle the incoming raw byte data.
      D read​(byte[] data)
      Construct packet data out of the raw byte data.
    • Method Detail

      • canHandle

        boolean canHandle​(byte[] data)
        Checks whether this PacketFactory is able to handle the incoming raw byte data.
        Parameters:
        data - the byte array containing the full packet data
        Returns:
        true if the read(byte[]) will result in a packet, false otherwise.