Package org.jgroups

Class FragmentedMessage

    • Field Detail

      • original_msg

        protected Message original_msg
    • Constructor Detail

      • FragmentedMessage

        public FragmentedMessage()
      • FragmentedMessage

        public FragmentedMessage​(Message original_msg,
                                 int off,
                                 int len)
    • Method Detail

      • getOriginalMessage

        public Message getOriginalMessage()
      • getType

        public short getType()
        Description copied from interface: Message
        Returns the type of the message, e.g. BYTES_MSG, OBJ_MSG etc
        Specified by:
        getType in interface Message
        Overrides:
        getType in class BytesMessage
      • hasArray

        public boolean hasArray()
        Description copied from interface: Message
        Returns true if this message has a byte[] array as payload (even if it's null!), false otherwise
        Specified by:
        hasArray in interface Message
        Overrides:
        hasArray in class BytesMessage
      • copyPayload

        protected Message copyPayload​(Message copy)
        Description copied from class: BytesMessage
        Copies the byte array. If offset and length are used (to refer to another array), the copy will contain only the subset that offset and length point to, copying the subset into the new copy.

        Note that for headers, only the arrays holding references to the headers are copied, not the headers themselves ! The consequence is that the headers array of the copy hold the *same* references as the original, so do *not* modify the headers ! If you want to change a header, copy it and call BaseMessage.putHeader(short,Header) again.

        Overrides:
        copyPayload in class BytesMessage
      • writePayload

        public void writePayload​(java.io.DataOutput out)
                          throws java.io.IOException
        Specified by:
        writePayload in interface Message
        Overrides:
        writePayload in class BytesMessage
        Throws:
        java.io.IOException
      • readPayload

        public void readPayload​(java.io.DataInput in)
                         throws java.io.IOException
        Specified by:
        readPayload in interface Message
        Overrides:
        readPayload in class BytesMessage
        Throws:
        java.io.IOException