Interface IPacket

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] getBody()
      Returns the packet body, for transport for extra data, like files or zip archives or something else
      int getChannel()
      Returns the channel id, in that the IPacketListenerRegistry class should the listeners work with that packet
      JsonDocument getHeader()
      The header, contain all important information from the packet, to specify the packet type as channel does and/or can has the data, which that are important to handle with
      java.util.UUID getUniqueId()
      Returns the uuid of the packet.
    • Method Detail

      • getUniqueId

        java.util.UUID getUniqueId()
        Returns the uuid of the packet. Each packet should has a own defined UUID instance, less the callback packets for synchronized messages between client and server
        Returns:
        the own uniqueId
      • getChannel

        int getChannel()
        Returns the channel id, in that the IPacketListenerRegistry class should the listeners work with that packet
        Returns:
        the channel id in that the packet is defined
      • getHeader

        JsonDocument getHeader()
        The header, contain all important information from the packet, to specify the packet type as channel does and/or can has the data, which that are important to handle with

        The encoding should be UTF-8

        Returns:
        the header as JsonDocument instance from this packet
      • getBody

        byte[] getBody()
        Returns the packet body, for transport for extra data, like files or zip archives or something else

        The max length of the body can only be (Integer.MAX_VALUE - 1)

        Returns:
        the body as byte array in bytes