public class Client {
public static void main(String[] args) {
Service<ThriftClientRequest, byte[]> client = ClientBuilder.safeBuild(ClientBuilder.get()
.hosts(new InetSocketAddress(8080))
.codec(new ThriftClientFramedCodecFactory())
.hostConnectionLimit(100)); // IMPORTANT: this determines how many rpc's are sent in at once.
// If set to 1, you get no parallelism on for this client.
Haver.ServiceIface haverClient = new Haver.ServiceToClient(client, new TBinaryProtocol.Factory());