class AdminHttpServer extends AbstractAdminServer {
    private final Netty4HttpServer httpServer;

    public AdminHttpServer(URL url, AdminHandler adminHandler) {
        this.url = url;
        this.adminHandler = adminHandler;
        httpServer = new Netty4HttpServer(url, (channel, httpRequest) -> {
            FullHttpResponse httpResponse;
            try {
                httpResponse = convertHttpResponse(adminHandler.handle(convertRequest(httpRequest)));
            } catch (Exception e) {
                httpResponse = NettyHttpUtil.buildErrorResponse(AdminUtil.toJsonErrorMessage(e.getMessage()));
            }
            return httpResponse;
        });
    }

    private Request convertRequest(FullHttpRequest httpRequest) throws IOException {<FILL_FUNCTION_BODY>}

    private FullHttpResponse convertHttpResponse(Response response) {
        if (response.getException() != null) {
            String errMsg;
            if (response.getException() instanceof MotanAbstractException) {
                errMsg = ((MotanAbstractException) response.getException()).getOriginMessage();
            } else {
                errMsg = response.getException().getMessage();
            }
            return NettyHttpUtil.buildErrorResponse(errMsg);
        }
        return NettyHttpUtil.buildResponse(response.getValue().toString());
    }

    @Override
    public boolean open() {
        return httpServer.open();
    }

    @Override
    public void close() {
        httpServer.close();
    }
}

        DefaultRequest request = new DefaultRequest();
        Map<String, String> params = new ConcurrentHashMap<>();

        // add headers to attachments
        for (Map.Entry<String, String> entry : httpRequest.headers()) {
            request.setAttachment(entry.getKey(), entry.getValue());
        }

        // add method and query params
        request.setMethodName(NettyHttpUtil.addQueryParams(httpRequest.uri(), params));

        // add post params
        NettyHttpUtil.addPostParams(httpRequest, params);
        request.setArguments(new Object[]{params});
        return request;
    
<methods>public non-sealed void <init>() ,public com.weibo.api.motan.admin.AdminHandler getAdminHandler() ,public com.weibo.api.motan.rpc.URL getUrl() <variables>protected com.weibo.api.motan.admin.AdminHandler adminHandler,protected com.weibo.api.motan.rpc.URL url