final TProtocol protocol = protocolFactory.getProtocol(niftyClient.connectSync(type, framedClientConnector));
return serviceClientFactory.getClient(protocol);
}
public T newClient(final HostAndPort hostAndPort) throws TTransportException, InterruptedException {
final TDuplexProtocolFactory duplexProtocolFactory = TDuplexProtocolFactory.fromSingleFactory(protocolFactory);
final FramedClientConnector framedClientConnector = new FramedClientConnector(hostAndPort, duplexProtocolFactory);
final TProtocol protocol = protocolFactory.getProtocol(niftyClient.connectSync(type, framedClientConnector));
return serviceClientFactory.getClient(protocol);
}