Class Nio2Endpoint

    • Constructor Detail

      • Nio2Endpoint

        public Nio2Endpoint()
    • Method Detail

      • getKeepAliveCount

        public int getKeepAliveCount()
        Number of keep-alive sockets.
        Returns:
        Always returns -1.
      • bind

        public void bind()
                  throws java.lang.Exception
        Initialize the endpoint.
        Specified by:
        bind in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Throws:
        java.lang.Exception
      • startInternal

        public void startInternal()
                           throws java.lang.Exception
        Start the NIO2 endpoint, creating acceptor.
        Specified by:
        startInternal in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Throws:
        java.lang.Exception
      • resume

        public void resume()
        Description copied from class: AbstractEndpoint
        Resume the endpoint, which will make it start accepting new connections again.
        Overrides:
        resume in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
      • stopInternal

        public void stopInternal()
        Stop the endpoint. This will cause all processing threads to stop.
        Specified by:
        stopInternal in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
      • unbind

        public void unbind()
                    throws java.lang.Exception
        Deallocate NIO memory pools, and close server socket.
        Overrides:
        unbind in class AbstractJsseEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Throws:
        java.lang.Exception
      • doCloseServerSocket

        protected void doCloseServerSocket()
                                    throws java.io.IOException
        Description copied from class: AbstractEndpoint
        Actually close the server socket but don't perform any other clean-up.
        Specified by:
        doCloseServerSocket in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Throws:
        java.io.IOException - If an error occurs closing the socket
      • setSocketOptions

        protected boolean setSocketOptions​(java.nio.channels.AsynchronousSocketChannel socket)
        Process the specified connection.
        Specified by:
        setSocketOptions in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Parameters:
        socket - The socket channel
        Returns:
        true if the socket was correctly configured and processing may continue, false if the socket needs to be close immediately
      • destroySocket

        protected void destroySocket​(java.nio.channels.AsynchronousSocketChannel socket)
        Description copied from class: AbstractEndpoint
        Close the socket. This is used when the connector is not in a state which allows processing the socket, or if there was an error which prevented the allocation of the socket wrapper.
        Specified by:
        destroySocket in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Parameters:
        socket - The newly accepted socket
      • serverSocketAccept

        protected java.nio.channels.AsynchronousSocketChannel serverSocketAccept()
                                                                          throws java.lang.Exception
        Specified by:
        serverSocketAccept in class AbstractEndpoint<Nio2Channel,​java.nio.channels.AsynchronousSocketChannel>
        Throws:
        java.lang.Exception
      • startInline

        public static void startInline()
      • endInline

        public static void endInline()
      • isInline

        public static boolean isInline()