Home / Function/ write() — netty Function Reference

write() — netty Function Reference

Architecture documentation for the write() function in HAProxyHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a3d8d787_2326_9033_6bf1_18963b33525e["write()"]
  5e2a8408_ad29_3562_64af_3c132f548382["HAProxyHandler"]
  a3d8d787_2326_9033_6bf1_18963b33525e -->|defined in| 5e2a8408_ad29_3562_64af_3c132f548382
  style a3d8d787_2326_9033_6bf1_18963b33525e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/haproxy/HAProxyHandler.java lines 34–47

    @Override
    public void write(final ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
        ChannelFuture future = ctx.write(msg, promise);
        if (msg instanceof HAProxyMessage) {
            future.addListener(future1 -> {
                if (future1.isSuccess()) {
                    ctx.pipeline().remove(HAProxyMessageEncoder.INSTANCE);
                    ctx.pipeline().remove(HAProxyHandler.this);
                } else {
                    ctx.close();
                }
            });
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does write() do?
write() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/haproxy/HAProxyHandler.java.
Where is write() defined?
write() is defined in example/src/main/java/io/netty/example/haproxy/HAProxyHandler.java at line 34.

Analyze Your Own Codebase

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

Try Supermodel Free