This class is an interpreter for node in executable documents that contain R code.
It implements the compile, execute, and other core methods of Executa's
Executor
interface.
The executed node with properties such as outputs and errors
potentially updated.
Currently only handles a single session.
See Pyla and Basha for examples of implementations of interpreters for other languages, in other languages.
envirEnvironment for the session
new()Initialize an Interpreter instance
Interpreter$new(servers = list(StdioServer$new()))
serversList of servers for the interpreter
manifest()Get the manifest for the interpreter.
The manifest describes the capabilities and addresses of an executor so that peers know how to delegate method calls to this interpreter.
Interpreter$manifest(then)
thenA function to call with the result
execute()Execute a node.
Interpreter$execute(node, job, then, ...)
nodeThe node to execute. Usually, a CodeChunk.
jobThe job id.
thenA function to call with the result
...Currently other arguments e.g. session are ignored.
dispatch()Dispatch a call to one of the interpreter's methods
Interpreter$dispatch(method, params, then, catch)
methodThe name of the method
paramsA list of parameter values (i.e. arguments)
thenA function to call with the result
catchA function to call with any error
register()Register this interpreter on this machine.
Creates a manifest file for the interpreter so that it can be used as a peer by other executors.
Interpreter$register()
start()Start serving the interpreter
Interpreter$start(background = -1)
backgroundRun the server in the background with this duration, in seconds,
stop()Stop serving the interpreter
Interpreter$stop()
clone()The objects of this class are cloneable with this method.
Interpreter$clone(deep = FALSE)
deepWhether to make a deep clone.