Class ConnectHandler.ConnectManager

    • Constructor Detail

      • ConnectManager

        protected ConnectManager​(java.util.concurrent.Executor executor,
                                 Scheduler scheduler,
                                 int selectors)
    • Method Detail

      • newConnection

        public Connection newConnection​(java.nio.channels.SelectableChannel channel,
                                        EndPoint endpoint,
                                        java.lang.Object attachment)
                                 throws java.io.IOException
        Description copied from class: SelectorManager

        Factory method to create Connection.

        Specified by:
        newConnection in class SelectorManager
        Parameters:
        channel - the channel associated to the connection
        endpoint - the endpoint
        attachment - the attachment
        Returns:
        a new connection
        Throws:
        java.io.IOException - if unable to create new connection
      • connectionFailed

        protected void connectionFailed​(java.nio.channels.SelectableChannel channel,
                                        java.lang.Throwable ex,
                                        java.lang.Object attachment)
        Description copied from class: SelectorManager

        Callback method invoked when a non-blocking connect cannot be completed.

        By default it just logs with level warning.

        Overrides:
        connectionFailed in class SelectorManager
        Parameters:
        channel - the channel that attempted the connect
        ex - the exception that caused the connect to fail
        attachment - the attachment object associated at registration