Home / Class/ IoUringServerDomainSocketChannel Class — netty Architecture

IoUringServerDomainSocketChannel Class — netty Architecture

Architecture documentation for the IoUringServerDomainSocketChannel class in IoUringServerDomainSocketChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  61fc116a_c568_52fb_d4b5_fb869ca3c773["IoUringServerDomainSocketChannel"]
  a077d71d_94b3_b8a5_9db6_2c0413a1e3c6["IoUringServerDomainSocketChannel.java"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|defined in| a077d71d_94b3_b8a5_9db6_2c0413a1e3c6
  1cbcc023_34f2_df6f_2656_e2fa684de359["IoUringServerDomainSocketChannel()"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|method| 1cbcc023_34f2_df6f_2656_e2fa684de359
  73eda30d_2548_898c_7f43_bd161eb078b8["Channel()"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|method| 73eda30d_2548_898c_7f43_bd161eb078b8
  891f4cec_4105_8f5c_2b8f_838219f8443c["ChannelConfig()"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|method| 891f4cec_4105_8f5c_2b8f_838219f8443c
  400b0147_c0eb_b074_f100_5ef64e300d41["DomainSocketAddress()"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|method| 400b0147_c0eb_b074_f100_5ef64e300d41
  0ab39f3a_c4ef_b715_9cd9_f051f27034b4["doBind()"]
  61fc116a_c568_52fb_d4b5_fb869ca3c773 -->|method| 0ab39f3a_c4ef_b715_9cd9_f051f27034b4

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringServerDomainSocketChannel.java lines 31–87

public final class IoUringServerDomainSocketChannel extends AbstractIoUringServerChannel
        implements ServerDomainSocketChannel {

    private static final InternalLogger logger = InternalLoggerFactory.getInstance(
            IoUringServerDomainSocketChannel.class);

    private final IoUringServerSocketChannelConfig config;

    private volatile DomainSocketAddress local;

    public IoUringServerDomainSocketChannel() {
        super(LinuxSocket.newSocketDomain(), false);
        this.config = new IoUringServerSocketChannelConfig(this);
        this.closeFuture().addListener(new ChannelFutureListener() {
            @Override
            public void operationComplete(ChannelFuture future) throws Exception {
                if (local != null) {
                    // Delete the socket file if possible.
                    File socketFile = new File(local.path());
                    boolean success = socketFile.delete();
                    if (!success && logger.isDebugEnabled()) {
                        logger.debug("Failed to delete a domain socket file: {}", local.path());
                    }
                }
            }
        });
    }

    @Override
    Channel newChildChannel(int fd, ByteBuffer acceptedAddressMemory) throws Exception {
        return new IoUringDomainSocketChannel(this, new LinuxSocket(fd));
    }

    @Override
    public ChannelConfig config() {
        return config;
    }

    @Override
    public DomainSocketAddress localAddress() {
        return local;
    }

    @Override
    public DomainSocketAddress remoteAddress() {
        return (DomainSocketAddress) super.remoteAddress();
    }

    @Override
    protected void doBind(SocketAddress localAddress) throws Exception {
        socket.bind(localAddress);
        socket.listen(config.getBacklog());
        local = (DomainSocketAddress) localAddress;
        active = true;
    }

}

Frequently Asked Questions

What is the IoUringServerDomainSocketChannel class?
IoUringServerDomainSocketChannel is a class in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringServerDomainSocketChannel.java.
Where is IoUringServerDomainSocketChannel defined?
IoUringServerDomainSocketChannel is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringServerDomainSocketChannel.java at line 31.

Analyze Your Own Codebase

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

Try Supermodel Free