Home / Type/ IoHandle Type — netty Architecture

IoHandle Type — netty Architecture

Architecture documentation for the IoHandle type/interface in IoHandle.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7ff91d9a_f973_3887_748f_5ac1d29067ea["IoHandle"]
  2073cbf6_4747_dd90_2041_0eca7a521a80["IoHandle.java"]
  7ff91d9a_f973_3887_748f_5ac1d29067ea -->|defined in| 2073cbf6_4747_dd90_2041_0eca7a521a80
  style 7ff91d9a_f973_3887_748f_5ac1d29067ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/IoHandle.java lines 27–60

public interface IoHandle extends AutoCloseable {

    /**
     * Be called once there is something to handle.
     *
     * @param registration  the {@link IoRegistration} for this {@link IoHandle}.
     * @param ioEvent       the {@link IoEvent} that must be handled. The {@link IoEvent} is only valid
     *                      while this method is executed and so must not escape it.
     */
    void handle(IoRegistration registration, IoEvent ioEvent);

    /**
     * Called once this {@link IoHandle} was registered and so will start to receive events
     * via {@link #handle(IoRegistration, IoEvent)}.
     */
    default void registered() {
        // Noop by default.
    }

    /**
     * Called once this {@link IoHandle} was unregistered and so will not receive any more events
     * via {@link #handle(IoRegistration, IoEvent)}.
     */
    default void unregistered() {
        // Noop by default.
    }

    /**
     * Called once the {@link IoHandle} should be closed. Even once this method is called this handle might
     * still receive events via {@link #handle(IoRegistration, IoEvent)} (if it was previous be registered and so its
     * {@link #registered()} method was called) until the {@link #unregistered()} method is called.
     */
    void close() throws Exception;
}

Frequently Asked Questions

What is the IoHandle type?
IoHandle is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/IoHandle.java.
Where is IoHandle defined?
IoHandle is defined in transport/src/main/java/io/netty/channel/IoHandle.java at line 27.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free