use of io.servicecomb.foundation.vertx.SimpleJsonObject in project java-chassis by ServiceComb.
the class HighwayTransport method init.
public boolean init() throws Exception {
HighwayCodec.setHighwayTransport(this);
DeploymentOptions deployOptions = new DeploymentOptions().setInstances(HighwayConfig.getServerThreadCount());
setListenAddressWithoutSchema(HighwayConfig.getAddress(), Collections.singletonMap(TcpConst.LOGIN, "true"));
SimpleJsonObject json = new SimpleJsonObject();
json.put(ENDPOINT_KEY, getEndpoint());
deployOptions.setConfig(json);
return VertxUtils.blockDeploy(transportVertx, HighwayServerVerticle.class, deployOptions);
}
use of io.servicecomb.foundation.vertx.SimpleJsonObject in project java-chassis by ServiceComb.
the class VertxRestTransport method init.
@Override
public boolean init() throws Exception {
// 部署transport server
DeploymentOptions options = new DeploymentOptions().setInstances(TransportConfig.getThreadCount());
setListenAddressWithoutSchema(TransportConfig.getAddress());
SimpleJsonObject json = new SimpleJsonObject();
json.put(ENDPOINT_KEY, getEndpoint());
options.setConfig(json);
return VertxUtils.blockDeploy(transportVertx, RestServerVerticle.class, options);
}
Aggregations