Class SingleCoreListeningIOReactor

    • Field Detail

      • endpoints

        private final java.util.concurrent.ConcurrentMap<ListenerEndpointImpl,​java.lang.Boolean> endpoints
      • paused

        private final java.util.concurrent.atomic.AtomicBoolean paused
      • selectTimeoutMillis

        private final long selectTimeoutMillis
    • Method Detail

      • processEvents

        private void processEvents​(int readyCount)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • processEvent

        private void processEvent​(java.nio.channels.SelectionKey key)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • listen

        public java.util.concurrent.Future<ListenerEndpoint> listen​(java.net.SocketAddress address,
                                                                    java.lang.Object attachment,
                                                                    FutureCallback<ListenerEndpoint> callback)
        Description copied from interface: ConnectionAcceptor
        Opens a new listener endpoint with the given socket address. Once the endpoint is fully initialized it starts accepting incoming connections and propagates I/O activity notifications to the I/O event dispatcher.
        Specified by:
        listen in interface ConnectionAcceptor
        Parameters:
        address - the socket address to listen on.
        attachment - the attachment object.
        callback - the result callback.
        Returns:
        listener endpoint.
      • listen

        public java.util.concurrent.Future<ListenerEndpoint> listen​(java.net.SocketAddress address,
                                                                    FutureCallback<ListenerEndpoint> callback)
        Description copied from interface: ConnectionAcceptor
        Opens a new listener endpoint with the given socket address. Once the endpoint is fully initialized it starts accepting incoming connections and propagates I/O activity notifications to the I/O event dispatcher.
        Specified by:
        listen in interface ConnectionAcceptor
        Parameters:
        address - the socket address to listen on.
        callback - the result callback.
        Returns:
        listener endpoint.
      • processSessionRequests

        private void processSessionRequests()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • pause

        public void pause()
                   throws java.io.IOException
        Description copied from interface: ConnectionAcceptor
        Suspends the I/O reactor preventing it from accepting new connections on all active endpoints.
        Specified by:
        pause in interface ConnectionAcceptor
        Throws:
        java.io.IOException - in case of an I/O error.
      • resume

        public void resume()
                    throws java.io.IOException
        Description copied from interface: ConnectionAcceptor
        Resumes the I/O reactor restoring its ability to accept incoming connections on all active endpoints.
        Specified by:
        resume in interface ConnectionAcceptor
        Throws:
        java.io.IOException - in case of an I/O error.