Class TemporarySelectorReader

    • Method Detail

      • read

        public void read​(Connection<java.net.SocketAddress> connection,
                         Buffer message,
                         CompletionHandler<ReadResult<Buffer,​java.net.SocketAddress>> completionHandler,
                         Interceptor<ReadResult> interceptor)
        Description copied from interface: Reader
        Method reads data to the buffer.
        Parameters:
        connection - the Connection to read from
        message - the Buffer to which data will be read
        completionHandler - CompletionHandler, which will get notified, when read will be completed
        interceptor - Interceptor, which will be able to intercept control each time new portion of a data was read to a buffer. The interceptor can decide, whether asynchronous read is completed or not, or provide other processing instructions.
      • read

        public void read​(Connection<java.net.SocketAddress> connection,
                         Buffer message,
                         CompletionHandler<ReadResult<Buffer,​java.net.SocketAddress>> completionHandler,
                         Interceptor<ReadResult> interceptor,
                         long timeout,
                         java.util.concurrent.TimeUnit timeunit)
        Method reads data to the message.
        Parameters:
        connection - the Connection to read from
        message - the message, where data will be read
        completionHandler - CompletionHandler, which will get notified, when read will be completed
        interceptor - intercept to invoke on operation
        timeout - operation timeout value value
        timeunit - the timeout unit
        Throws:
        java.io.IOException
      • read0

        protected final int read0​(NIOConnection connection,
                                  ReadResult<Buffer,​java.net.SocketAddress> currentResult,
                                  Buffer buffer,
                                  long timeout,
                                  java.util.concurrent.TimeUnit timeunit)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readNow0

        protected abstract int readNow0​(NIOConnection connection,
                                        Buffer buffer,
                                        ReadResult<Buffer,​java.net.SocketAddress> currentResult)
                                 throws java.io.IOException
        Throws:
        java.io.IOException