use of rpc.turbo.config.client.AppConfig in project turbo-rpc by hank-whu.
the class TurboClient method addConnect.
/**
* 手动建立连接
*
* @param group
* @param hostPorts
*/
public void addConnect(String group, String app, HostPort... hostPorts) {
Objects.requireNonNull(group, "group");
Objects.requireNonNull(app, "app");
Objects.requireNonNull(hostPorts, "hostPorts");
try {
AppConfig appConfig = new AppConfig();
appConfig.setGroup(group);
appConfig.setApp(app);
App _app = new App(eventLoopGroup, appConfig, filters);
_app.setConnect(hostPorts);
appMap.put(_app, Boolean.TRUE);
} catch (Exception e) {
throw new RemoteException(e);
}
}
Aggregations