class GrpcProtocol extends AbstractProtocol {
    protected ConcurrentHashMap<String, GrpcServer> serverMap = new ConcurrentHashMap<String, GrpcServer>();

    @Override
    protected <T> Exporter<T> createExporter(Provider<T> provider, URL url) {<FILL_FUNCTION_BODY>}

    @Override
    protected <T> Referer<T> createReferer(Class<T> clz, URL url, URL serviceUrl) {
        return new GrpcReferer<T>(clz, url, serviceUrl);
    }

    class GrpcExporter<T> extends AbstractExporter<T> {
        private GrpcServer server;

        public GrpcExporter(Provider<T> provider, URL url, GrpcServer server) {
            super(provider, url);
            this.server = server;
        }

        @SuppressWarnings("unchecked")
        @Override
        public void unexport() {
            String protocolKey = MotanFrameworkUtil.getProtocolKey(url);
            Exporter<T> exporter = (Exporter<T>) exporterMap.remove(protocolKey);

            if (exporter != null) {
                exporter.destroy();
            }
            LoggerUtil.info("GrpcExporter unexport Success: url={}", url);
        }

        @Override
        public void destroy() {
            server.safeRelease(url);
            LoggerUtil.info("GrpcExporter destory Success: url={}", url);
        }

        @Override
        protected boolean doInit() {
            try {
                server.init();
                server.addExporter(this);
                return true;
            } catch (Exception e) {
                LoggerUtil.error("grpc server init fail!", e);
            }
            return false;
        }

    }


    class GrpcReferer<T> extends AbstractReferer<T> {
        private GrpcClient client;

        public GrpcReferer(Class<T> clz, URL url, URL serviceUrl) {
            super(clz, url, serviceUrl);
            client = new GrpcClient(url, clz);
        }

        @Override
        public void destroy() {
            client.destroy();
            LoggerUtil.info("GrpcReferer destory Success: url={}", url);
        }

        @Override
        protected Response doCall(Request request) {
            return client.request(request);
        }

        @Override
        protected boolean doInit() {
            try {
                client.init();
                return true;
            } catch (Exception e) {
                LoggerUtil.error("grpc client init fail!", e);
            }
            return false;
        }

    }

}

        String ipPort = url.getServerPortStr();
        GrpcServer server = serverMap.get(ipPort);
        if (server == null) {
            boolean shareChannel =
                    url.getBooleanParameter(URLParamType.shareChannel.getName(), URLParamType.shareChannel.getBooleanValue());

            int workerQueueSize = url.getIntParameter(URLParamType.workerQueueSize.getName(), URLParamType.workerQueueSize.getIntValue());

            int minWorkerThread = 0, maxWorkerThread = 0;

            if (shareChannel) {
                minWorkerThread =
                        url.getIntParameter(URLParamType.minWorkerThread.getName(), MotanConstants.NETTY_SHARECHANNEL_MIN_WORKDER);
                maxWorkerThread =
                        url.getIntParameter(URLParamType.maxWorkerThread.getName(), MotanConstants.NETTY_SHARECHANNEL_MAX_WORKDER);
            } else {
                minWorkerThread =
                        url.getIntParameter(URLParamType.minWorkerThread.getName(), MotanConstants.NETTY_NOT_SHARECHANNEL_MIN_WORKDER);
                maxWorkerThread =
                        url.getIntParameter(URLParamType.maxWorkerThread.getName(), MotanConstants.NETTY_NOT_SHARECHANNEL_MAX_WORKDER);
            }

            ExecutorService executor =
                    new StandardThreadExecutor(minWorkerThread, maxWorkerThread, workerQueueSize, new DefaultThreadFactory("GrpcServer-"
                            + url.getServerPortStr(), true));
            server = new GrpcServer(url.getPort(), shareChannel, executor);
            serverMap.putIfAbsent(ipPort, server);
            server = serverMap.get(ipPort);

        }
        return new GrpcExporter<T>(provider, url, server);
    
<methods>public non-sealed void <init>() ,public void destroy() ,public Exporter<T> export(Provider<T>, com.weibo.api.motan.rpc.URL) ,public Map<java.lang.String,Exporter<?>> getExporterMap() ,public Referer<T> refer(Class<T>, com.weibo.api.motan.rpc.URL) ,public Referer<T> refer(Class<T>, com.weibo.api.motan.rpc.URL, com.weibo.api.motan.rpc.URL) <variables>protected ConcurrentHashMap<java.lang.String,Exporter<?>> exporterMap