ably / ably-java

Java, Android, Clojure and Scala client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
86 stars 39 forks source link

async methods #260

Open mattheworiordan opened 7 years ago

mattheworiordan commented 7 years ago

A customer has asked how they can call client.auth.authorize in a non-blocking way. Currently, in the Java lib I believe this is only possible with a new thread.

Should we consider offering async alternatives to traditionally blocking method calls?

cc paddybyers

┆Issue is synchronized with this Jira Task by Unito

paddybyers commented 7 years ago

We have async variants of the other REST queries so we should add requestTokenAsync()

mattheworiordan commented 7 years ago

We have async variants of the other REST queries so we should add

Sure, so is the rule then that if an async suffixed method does not exist then the dev can assume the method is async? Seems a little haphazard IMHO