Class MessageChunk

  • All Implemented Interfaces:
    io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted
    Direct Known Subclasses:
    LastMessageChunk

    public class MessageChunk
    extends io.netty.buffer.DefaultByteBufHolder
    Represents a chunk of a message that is too large to be transmitted as a whole.
    See Also:
    LastMessageChunk, ChunkedMessageInput
    • Constructor Detail

      • MessageChunk

        public MessageChunk​(byte msgId,
                            int chunkNo,
                            io.netty.buffer.ByteBuf content)
        Parameters:
        msgId - id of the message to which this chunk belongs
        chunkNo - number of this chunk (starting with 0)
        content - message's content portion of this chunk
    • Method Detail

      • toString

        public String toString()
        Overrides:
        toString in class io.netty.buffer.DefaultByteBufHolder
      • msgId

        public byte msgId()
        Returns:
        id of the message to which this chunk belongs
      • chunkNo

        public int chunkNo()
        Returns:
        number of this chunk (starting with 0)
      • replace

        public MessageChunk replace​(io.netty.buffer.ByteBuf content)
        Specified by:
        replace in interface io.netty.buffer.ByteBufHolder
        Overrides:
        replace in class io.netty.buffer.DefaultByteBufHolder
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class io.netty.buffer.DefaultByteBufHolder
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class io.netty.buffer.DefaultByteBufHolder