Interface EventLoop

  • All Superinterfaces:
    io.netty5.util.concurrent.EventExecutor, io.netty5.util.concurrent.EventExecutorGroup, EventLoopGroup, Executor, io.netty5.util.concurrent.FuturePromiseFactory, Iterable<io.netty5.util.concurrent.EventExecutor>, io.netty5.util.concurrent.OrderedEventExecutor
    All Known Implementing Classes:
    SingleThreadEventLoop

    public interface EventLoop
    extends io.netty5.util.concurrent.OrderedEventExecutor, EventLoopGroup
    Will handle all the I/O operations for a IoHandle once registered.

    One EventLoop instance will usually handle more than one IoHandle but this may depend on implementation details and internals.

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      io.netty5.util.concurrent.Future<Void> deregisterForIo​(IoHandle handle)
      Deregister the Channel from the EventLoop for I/O processing.
      boolean isCompatible​(Class<? extends IoHandle> handleType)
      Returns true if the given type is compatible with this EventLoopGroup and so can be registered to the contained EventLoops, false otherwise.
      default EventLoop next()
      Return the next EventLoop to use
      io.netty5.util.concurrent.Future<Void> registerForIo​(IoHandle handle)
      Register the IoHandle to the EventLoop for I/O processing.
      • Methods inherited from interface io.netty5.util.concurrent.EventExecutor

        execute, inEventLoop, inEventLoop, iterator, newFailedFuture, newPromise, newSucceededFuture, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, submit, submit, submit
      • Methods inherited from interface io.netty5.util.concurrent.EventExecutorGroup

        awaitTermination, isShutdown, isShuttingDown, isTerminated, shutdownGracefully, shutdownGracefully, terminationFuture
      • Methods inherited from interface io.netty5.util.concurrent.FuturePromiseFactory

        newSucceededFuture
    • Method Detail

      • next

        default EventLoop next()
        Description copied from interface: EventLoopGroup
        Return the next EventLoop to use
        Specified by:
        next in interface io.netty5.util.concurrent.EventExecutor
        Specified by:
        next in interface io.netty5.util.concurrent.EventExecutorGroup
        Specified by:
        next in interface EventLoopGroup
      • registerForIo

        io.netty5.util.concurrent.Future<Void> registerForIo​(IoHandle handle)
        Register the IoHandle to the EventLoop for I/O processing.
        Parameters:
        handle - the IoHandle to register.
        Returns:
        the Future that is notified once the operations completes.
      • deregisterForIo

        io.netty5.util.concurrent.Future<Void> deregisterForIo​(IoHandle handle)
        Deregister the Channel from the EventLoop for I/O processing.
        Parameters:
        channel - the IoHandle to deregister.
        Returns:
        the Future that is notified once the operations completes.