Home / Function/ register0() — netty Function Reference

register0() — netty Function Reference

Architecture documentation for the register0() function in NioEventLoop.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4733bb3b_c917_0869_d029_8f8cfcc03b71["register0()"]
  b837b976_90bd_d303_000d_805c26e1d843["NioEventLoop"]
  4733bb3b_c917_0869_d029_8f8cfcc03b71 -->|defined in| b837b976_90bd_d303_000d_805c26e1d843
  11a1944a_feaf_3e61_83a4_e456bb347439["register()"]
  11a1944a_feaf_3e61_83a4_e456bb347439 -->|calls| 4733bb3b_c917_0869_d029_8f8cfcc03b71
  style 4733bb3b_c917_0869_d029_8f8cfcc03b71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/nio/NioEventLoop.java lines 112–138

    private void register0(final SelectableChannel ch, int interestOps, final NioTask<SelectableChannel> task) {
        try {
            IoRegistration registration = register(
                    new NioSelectableChannelIoHandle<SelectableChannel>(ch) {
                        @Override
                        protected void handle(SelectableChannel channel, SelectionKey key) {
                            try {
                                task.channelReady(channel, key);
                            } catch (Exception e) {
                                logger.warn("Unexpected exception while running NioTask.channelReady(...)", e);
                            }
                        }

                        @Override
                        protected void deregister(SelectableChannel channel) {
                            try {
                                task.channelUnregistered(channel, null);
                            } catch (Exception e) {
                                logger.warn("Unexpected exception while running NioTask.channelUnregistered(...)", e);
                            }
                        }
                    }).get();
            registration.submit(NioIoOps.valueOf(interestOps));
        } catch (Exception e) {
            throw new IllegalStateException(e);
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does register0() do?
register0() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/NioEventLoop.java.
Where is register0() defined?
register0() is defined in transport/src/main/java/io/netty/channel/nio/NioEventLoop.java at line 112.
What calls register0()?
register0() is called by 1 function(s): register.

Analyze Your Own Codebase

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

Try Supermodel Free