Class SameThreadIOStrategy

    • Method Detail

      • executeIoEvent

        public boolean executeIoEvent​(Connection connection,
                                      IOEvent ioEvent,
                                      boolean isIoEventEnabled)
                               throws IOException
        Description copied from interface: IOStrategy
        The SelectorRunner will invoke this method to allow the strategy implementation to decide how the IOEvent will be handled.
        Parameters:
        connection - the Connection upon which the provided IOEvent occurred.
        ioEvent - the IOEvent that triggered execution of this strategy
        isIoEventEnabled - true if IOEvent is still enabled on the Connection, or false if IOEvent was preliminary disabled or IOEvent is being simulated.
        Returns:
        true, if this thread should keep processing IOEvents on the current and other Connections, or false if this thread should hand-off the farther IOEvent processing on any Connections, which means IOStrategy is becoming responsible for continuing IOEvent processing (possibly starting new thread, which will handle IOEvents).
        Throws:
        IOException - if an error occurs processing the IOEvent.