Java中的Thrift异步HTTP客户端?

时间:2015-02-23 11:50:33

标签: java scala thrift

我在PHP中有一个Thrift API服务器,看起来非常像这样 https://github.com/edvakf/Thrift-Example/blob/master/api.php

我正在使用官方Apache Thrift库在Scala中编写客户端。 https://github.com/apache/thrift

val clientFactory = new ArithmeticService.Client.Factory
val transport = new THttpClient(url)
val protocol = new TBinaryProtocol(transport)
val client = factory.getClient(protocol)
transport.open()
// do things with the client
transport.close()

我的问题是;如何让它成为异步(非阻塞)?

0 个答案:

没有答案