use of org.apache.servicecomb.foundation.vertx.SimpleJsonObject in project java-chassis by ServiceComb.
the class VertxRestTransport method init.
@Override
public boolean init() throws Exception {
restClient = RestTransportClientManager.INSTANCE.getRestClient();
// 部署transport server
DeploymentOptions options = new DeploymentOptions().setInstances(TransportConfig.getThreadCount());
SimpleJsonObject json = new SimpleJsonObject();
json.put(ENDPOINT_KEY, getEndpoint());
json.put(RestTransportClient.class.getName(), restClient);
options.setConfig(json);
options.setWorkerPoolName("pool-worker-transport-rest");
options.setWorkerPoolSize(VertxOptions.DEFAULT_WORKER_POOL_SIZE);
prepareBlockResource();
return VertxUtils.blockDeploy(transportVertx, TransportConfig.getRestServerVerticle(), options);
}
Aggregations