Commit 88731035 by huangfusuper

Netty服务端 服务工厂代码优化,配置文件一键启动

parent b355084f
......@@ -5,7 +5,7 @@ import cn.hutool.core.net.NetUtil;
import com.byit.registry.DataSourceServiceRegistry;
import com.byit.registry.PluginServiceRegistry;
import com.byit.registry.client.model.RegistryDataParamVO;
import com.byit.server.NettyPluginServer;
import com.byit.server.netty.NettyPluginServer;
import com.byit.server.PluginServer;
import com.byit.utils.IpUtil;
import org.apache.commons.lang3.StringUtils;
......@@ -239,4 +239,20 @@ public abstract class PluginServerFactory {
public void setServerKeys(Set<String> serverKeys) {
this.serverKeys = serverKeys;
}
public Map<String, Object> getServerPoll() {
return serverPoll;
}
public void setServerPoll(Map<String, Object> serverPoll) {
this.serverPoll = serverPoll;
}
public List<RegistryDataParamVO> getRegistryDataParamVOs() {
return registryDataParamVOs;
}
public void setRegistryDataParamVOs(List<RegistryDataParamVO> registryDataParamVOs) {
this.registryDataParamVOs = registryDataParamVOs;
}
}
package com.byit.factory;
import cn.hutool.core.collection.CollectionUtil;
import com.byit.executor.handler.interfaces.IJobHandler;
import com.byit.model.ServerConfigurationModel;
import com.byit.model.ServiceConfigModel;
import com.byit.registry.PluginServiceRegistry;
import com.byit.server.PluginServer;
import com.byit.utils.XmlParseUtil;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
......@@ -68,20 +66,5 @@ public class RpcMainPluginServerFactory extends PluginServerFactory {
}catch (Exception e){
e.printStackTrace();
}
try {
} catch (Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
PluginServerFactory rpcMainPluginServerFactory = new RpcMainPluginServerFactory("/plugin.xml");
System.out.println(rpcMainPluginServerFactory);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment