@Override
        public void operationComplete(ChannelFuture f) {
            final ServerChannel ch = (ServerChannel) f.channel();
            assert ch.eventLoop().inEventLoop();
            serverChannels.add(ch);

            if (f.isSuccess()) {
                final SocketAddress localAddress = ch.localAddress();
                final ServerPort actualPort;
                if (localAddress instanceof InetSocketAddress) {
                    actualPort = new ServerPort((InetSocketAddress) localAddress,
                                                port.protocols(),
                                                port.portGroup());
                } else if (localAddress instanceof io.netty.channel.unix.DomainSocketAddress) {
                    // Convert Netty's DomainSocketAddress to ours.
                    final DomainSocketAddress converted = DomainSocketAddress.of(
                            (io.netty.channel.unix.DomainSocketAddress) localAddress);
                    actualPort = new ServerPort(converted,
                                                port.protocols(),
                                                port.portGroup());
                } else {
                    logger.warn("Unexpected local address type: {}", localAddress.getClass().getName());
                    return;
                }
                final ServerPortMetric serverPortMetric = ch.attr(SERVER_PORT_METRIC).get();
                assert serverPortMetric != null;
                actualPort.setServerPortMetric(serverPortMetric);

                // Update the boss thread so its name contains the actual port.
                Thread.currentThread().setName(bossThreadName(actualPort));

                lock.lock();
                try {
                    // Update the map of active ports.
                    activePorts.put(actualPort.localAddress(), actualPort);
                } finally {
                    lock.unlock();
                }

                config.serverMetrics().addServerPort(actualPort);

                if (logger.isInfoEnabled()) {
                    if (isLocalPort(actualPort)) {
                        port.protocols().forEach(p -> logger.info(
                                "Serving {} at {} - {}://127.0.0.1:{}/",
                                p.name(), localAddress, p.uriText(), actualPort.localAddress().getPort()));
                    } else {
                        logger.info("Serving {} at {}", Joiner.on('+').join(port.protocols()), localAddress);
                    }
                }
            }
        }
Collects the {@link ServerSocketChannel} and {@link ServerPort} on a successful bind operation.
core/src/main/java/com/linecorp/armeria/server/Server.java