class RestServer implements Server {

    @Override
    public void start() {
        if (started) {
            return;
        }
        synchronized (this) {
            if (started) {
                return;
            }
            // 绑定到端口
            try {
                httpServer.start();
                if (LOGGER.isInfoEnabled()) {
                    LOGGER.info("Start the http rest server at port {}", serverConfig.getPort());
                }
            } catch (SofaRpcRuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new SofaRpcRuntimeException(LogCodes.getLog(LogCodes.ERROR_START_SERVER_WITH_PORT, "rest",
                    serverConfig.getPort()), e);
            }
            started = true;
        }
    }

}