package com.chencoder.rpc.core;

public class RpcServer {

}

@@ -32,32 +32,832 @@
 %0D%0A%0D%0A
-public class RpcServer %7B
+import com.chencoder.rpc.common.config.RegistryConfig;%0D%0Aimport com.chencoder.rpc.common.config.ServerConfig;%0D%0Aimport com.chencoder.rpc.core.provider.Exporter;%0D%0A%0D%0Apublic class RpcServer %7B%0D%0A%09%0D%0A%09private ServerConfig config;%0D%0A%09%0D%0A%09private Exporter exporter = null;%0D%0A%0D%0A%09public RpcServer(ServerConfig config)%7B%0D%0A%09%09setConfig(config);%0D%0A%09%7D%0D%0A%09%0D%0A%09public RpcServer(ServerConfig config, RegistryConfig registryConfig)%7B%0D%0A%09%09setConfig(config);%0D%0A%09%09exporter = new Exporter(registryConfig);%0D%0A%09%7D%0D%0A%09%0D%0A%09public %3CT%3E void exportService(Class%3CT%3E serviceClass, T implObject)%7B%0D%0A%09%09if(exporter != null)%0D%0A%09%09%09exporter.exportService(serviceClass, implObject, config.getPort());%0D%0A%09%7D%0D%0A%09%0D%0A%09public void startServer()%7B%0D%0A%09%09%0D%0A%09%7D%0D%0A%0D%0A%09public ServerConfig getConfig() %7B%0D%0A%09%09return config;%0D%0A%09%7D%0D%0A%0D%0A%09public void setConfig(ServerConfig config) %7B%0D%0A%09%09this.config = config;%0D%0A%09%7D
 %0D%0A%0D%0A

add rpcServer