JsonRPCServer-class: A Rook app to be a JSON RPC server

Description Details Methods

Description

This app allows the browser to call back into R by specifying an object name, its method name and some parameters. The object then returns JSON to the browser. Only instances of subclasses of JsonRPCObject are allowed and for them only exported methods may be accessed.

Details

Unlike other gWidgetsWWW2 AJAX calls, the environment that these objects lives in is typically the global environment, rather than an environment that is created when a gWidgetsWWW2 page is. This allows one to share such objects across many pages. In the examples there is a page counter and a data set provider.

This is not subclassed, but rather the function call json_rpc_server should be made.

Methods

load(url = "JSON_RPC", port = 9000)

Load the server as Rook app.

read_rook_input(req)

Read rook.input, then convert from JSON


gWidgetsWWW2 documentation built on May 31, 2017, 4:35 a.m.