Search in sources :

Example 1 with AppConfig

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);
    }
}
Also used : App(rpc.turbo.transport.client.App) AppConfig(rpc.turbo.config.client.AppConfig) RemoteException(rpc.turbo.remote.RemoteException) IOException(java.io.IOException) RemoteException(rpc.turbo.remote.RemoteException)

Aggregations

IOException (java.io.IOException)1 AppConfig (rpc.turbo.config.client.AppConfig)1 RemoteException (rpc.turbo.remote.RemoteException)1 App (rpc.turbo.transport.client.App)1