I am currently building a Scala play framework app which uses a library that return results as F.Promise (Java Promise). Is there a way to convert F.Promises (https://www.playframework.com/documentation/2.1.0/api/java/play/libs/F.Promise.html) into Scala Promises or get the wrapped Scala Future out of the F.Promise?
The only way I see so far is getting the F.Promise but that is a blocking operation and I would like to continue working asynchronous.
The way descriped in the first answer led me to this code. Unfortunately I dont know how to define this F.Function correctly. The code does not compile.
Answer: So, I finally found out that the F.Promise has a method called wrapped(). And this method gives you a Scala Future back.