Interface ReadHandleFactory.ReadHandle

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int estimatedBufferCapacity()
      Guess the capacity for the next receive buffer that is probably large enough to read all inbound data and small enough not to waste its space.
      boolean lastRead​(int attemptedBytesRead, int actualBytesRead, int numMessagesRead)
      Notify the ReadHandleFactory.ReadHandle of the last read operation and its result.
      void readComplete()
      Method that must be called once the read loop was completed.
    • Method Detail

      • estimatedBufferCapacity

        int estimatedBufferCapacity()
        Guess the capacity for the next receive buffer that is probably large enough to read all inbound data and small enough not to waste its space.
      • lastRead

        boolean lastRead​(int attemptedBytesRead,
                         int actualBytesRead,
                         int numMessagesRead)
        Notify the ReadHandleFactory.ReadHandle of the last read operation and its result.
        Parameters:
        attemptedBytesRead - The number of bytes the read operation did attempt to read.
        actualBytesRead - The number of bytes from the previous read operation. This may be negative if a read error occurs.
        numMessagesRead - The number of messages read.
        Returns:
        true if the read loop should continue reading, false otherwise.
      • readComplete

        void readComplete()
        Method that must be called once the read loop was completed.