public void start()

in runner-core/src/main/java/org/apache/apisix/plugin/runner/server/ApplicationRunner.java [99:124]


    public void start(String path) throws Exception {
        EventLoopGroup group;
        ServerBootstrap bootstrap = new ServerBootstrap();
        if (KQueue.isAvailable()) {
            group = new KQueueEventLoopGroup();
            bootstrap.group(group).channel(KQueueServerDomainSocketChannel.class);
        } else if (Epoll.isAvailable()) {
            group = new EpollEventLoopGroup();
            bootstrap.group(group).channel(EpollServerDomainSocketChannel.class);
        } else {
            String errMsg = "java runner is only support epoll or kqueue";
            logger.warn(errMsg);
            throw new RuntimeException(errMsg);
        }

        try {
            initServerBootstrap(bootstrap);
            ChannelFuture future = bootstrap.bind(new DomainSocketAddress(path)).sync();
            Runtime.getRuntime().exec("chmod 777 " + socketFile);
            logger.warn("java runner is listening on the socket file: {}", socketFile);

            future.channel().closeFuture().sync();
        } finally {
            group.shutdownGracefully().sync();
        }
    }