I'm using javax.script to embed javascript code to a Java method.
In my project the javascript takes care to send asynchronous http request through a websocket. Once a response is received I need to execute a callback function.
I would like to invoke a method written in Java as a callback.
In the documentation here: http://docs.oracle.com/javase/6/docs/technotes/guides/scripting/programmer_guide/ it is explained how to implement java methods in javascript for an interface, but not how to invoke Java methods form javascript.
Thanks