use of org.ovirt.vdsm.jsonrpc.client.internal.ResponseWorker in project ovirt-engine by oVirt.
the class JsonRpcUtils method getJsonClient.
private static JsonRpcClient getJsonClient(Reactor reactor, String hostName, int port, ClientPolicy connectionPolicy, ClientPolicy clientPolicy, int parallelism, ScheduledExecutorService executorService) throws ClientConnectionException {
final ReactorClient client = reactor.createClient(hostName, port);
client.setClientPolicy(connectionPolicy);
ResponseWorker worker = ReactorFactory.getWorker(parallelism);
JsonRpcClient jsonClient = worker.register(client);
jsonClient.setRetryPolicy(clientPolicy);
jsonClient.setExecutorService(executorService);
return jsonClient;
}
Aggregations