Class IncomingMessage


  • public class IncomingMessage
    extends java.lang.Object
    An incoming message.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[][] data
      Message data.
      protected boolean internal
      Flag indicating internal messages.
      protected java.util.Set<java.lang.Integer> missingparts
      Set of missing parts.
    • Constructor Summary

      Constructors 
      Constructor Description
      IncomingMessage​(int size, boolean internal)
      Creates a new internal message.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPart​(int partnum, byte[] buffer, int offset)
      Adds a part to the message.
      byte[] getMessage()
      Returns the full message.
      boolean isDone()
      Returns true if the message is complete.
      boolean isInternal()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • data

        protected byte[][] data
        Message data.
      • missingparts

        protected java.util.Set<java.lang.Integer> missingparts
        Set of missing parts.
      • internal

        protected boolean internal
        Flag indicating internal messages.
    • Constructor Detail

      • IncomingMessage

        public IncomingMessage​(int size,
                               boolean internal)
        Creates a new internal message.
        Parameters:
        size - Number of parts.
        internal - Flag indicating an internal message.
    • Method Detail

      • addPart

        public void addPart​(int partnum,
                            byte[] buffer,
                            int offset)
        Adds a part to the message.
        Parameters:
        partnum - The part number.
        buffer - The buffer containing part data.
        offset - Offset position of the part data.
      • isDone

        public boolean isDone()
        Returns true if the message is complete.
        Returns:
        True, if complete.
      • isInternal

        public boolean isInternal()
      • getMessage

        public byte[] getMessage()
        Returns the full message.
        Returns:
        The message.