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)
        Description copied from class: SelectorManager

        Factory method to create Connection.

        Specified by:
        newConnection in class SelectorManager
        channel - the channel associated to the connection
        endpoint - the endpoint
        attachment - the attachment
        a new connection
        Throws: - 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.

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