@Override
public void sendRpc(String message) {
log.log("Got RPC message: " + message);
}
});
addFunction("messageToServer", new JavaScriptFunction() {
@Override
public void call(JsonArray arguments) {
log.log("Got callback message: " + arguments.getString(0));
}
});
addFunction("reportParentIds", new JavaScriptFunction() {
@Override
public void call(JsonArray arguments) {
JsonArray parentIds = arguments.getArray(0);
if (!parentIds.getString(0).equals(getConnectorId())) {
log.log("Connector ids doesn't match");