To setup a callback in javascript use JSON to specify the details with the following format:

"httpCallback": {
    "callbackClass": "org.mypackage.MyCallbackClass"
}