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

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