Class NioConnection.Reader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Runnable
    Enclosing class:
    NioConnection

    protected class NioConnection.Reader
    extends java.lang.Object
    implements java.lang.Runnable, java.io.Closeable
    • Field Detail

      • lock

        protected final java.util.concurrent.locks.Lock lock
      • data_available

        protected volatile boolean data_available
      • data_available_cond

        protected final CondVar data_available_cond
      • thread

        protected volatile java.lang.Thread thread
      • running

        protected volatile boolean running
    • Constructor Detail

      • Reader

        protected Reader()
    • Method Detail

      • start

        protected void start()
      • stop

        protected void stop()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • isRunning

        public boolean isRunning()
      • receive

        public void receive()
        Called by the selector when data is ready to be read from the SocketChannel
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • _run

        protected void _run()
      • register

        protected void register​(int op)
      • clear

        protected void clear​(int op)