ted wang created THRIFT-3312:
--------------------------------
Summary: Why java async client not use Future<V> as result?
Key: THRIFT-3312
URL: https://issues.apache.org/jira/browse/THRIFT-3312
Project: Thrift
Issue Type: Wish
Components: Java - Compiler, Java - Library
Affects Versions: 0.9.2, 0.9.1, 0.9
Reporter: ted wang
Priority: Minor
Java generated AsyncIface's method need a AsyncMethodCallback, I think this may
some complex for application developer.
Could make this return a Future<V> result like netty or finagle do when async?
For example:
sync method:
public int plusTen(int number) throws org.apache.thrift.TException;
now async method:
public void plusTen(int number, org.apache.thrift.async.AsyncMethodCallback
resultHandler) throws org.apache.thrift.TException;
new async method:
public Future<Integer> plusTen(int number) throws org.apache.thrift.TException;
This will make application developer not caring about the assemble of result.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)