Home / Function/ doRegister() — netty Function Reference

doRegister() — netty Function Reference

Architecture documentation for the doRegister() function in LocalChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9f78cf60_4bba_256d_19f7_ed523fbe93ff["doRegister()"]
  81a44f54_ab3c_5f8b_4522_05c91e5f8eb8["LocalChannel"]
  9f78cf60_4bba_256d_19f7_ed523fbe93ff -->|defined in| 81a44f54_ab3c_5f8b_4522_05c91e5f8eb8
  562d5c11_6ff6_9b17_d006_101ff1054c95["registered()"]
  9f78cf60_4bba_256d_19f7_ed523fbe93ff -->|calls| 562d5c11_6ff6_9b17_d006_101ff1054c95
  style 9f78cf60_4bba_256d_19f7_ed523fbe93ff fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/local/LocalChannel.java lines 171–192

    @Override
    protected void doRegister(ChannelPromise promise) {
        EventLoop loop = eventLoop();
        if (loop instanceof IoEventLoop) {
            assert registration == null;
            ((IoEventLoop) loop).register((LocalUnsafe) unsafe()).addListener(f -> {
               if (f.isSuccess()) {
                   registration = (IoRegistration) f.getNow();
                   promise.setSuccess();
               } else {
                   promise.setFailure(f.cause());
               }
            });
        } else {
            try {
                ((LocalUnsafe) unsafe()).registered();
            } catch (Throwable cause) {
                promise.setFailure(cause);
            }
            promise.setSuccess();
        }
    }

Domain

Subdomains

Calls

Frequently Asked Questions

What does doRegister() do?
doRegister() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/local/LocalChannel.java.
Where is doRegister() defined?
doRegister() is defined in transport/src/main/java/io/netty/channel/local/LocalChannel.java at line 171.
What does doRegister() call?
doRegister() calls 1 function(s): registered.

Analyze Your Own Codebase

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

Try Supermodel Free