Return ListenableFuture in the handler instead of the actual Response message
Closed this issue · 3 comments
truncs commented
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.
willsalz commented
Super pumped for this.
manasdk commented
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.
blampe commented
@manasdk that's awesome! Please include @abhinav and @vivekrsharma on the PR.