uber/tchannel-java

Return ListenableFuture in the handler instead of the actual Response message

Closed this issue · 3 comments

This would make easier to write proxy servers using tchannel-java. ListenableFuture. Its a little tricky since ListenableFutures are not settable and Guava provides another future called as SettableFuture.
So we need to compose a Future which can be Settable or Listenable to a ListenableFuture so that we can attach OnSuccess, onFailure handlers to it.

Super pumped for this.

I plan to push a PR that will introduce a new handler that returns a ListenableFuture<? extends Response> and call the new type a ThriftAsyncRequestHandler. This should essentially resolve the issue.

@manasdk that's awesome! Please include @abhinav and @vivekrsharma on the PR.