private class InviteToBBMConnFunction extends ScriptableFunctionBase {
protected Object execute(Object thiz, Object[] args) throws Exception {
final ScriptableFunction onComplete = (ScriptableFunction) args[0];
// Connection object is optional
final ConnectionObject connObj;
if(args.length >= 2) {
connObj = (ConnectionObject) args[1];
} else {
connObj = null;
}