ScriptingProtocolReplManager

class ScriptingProtocolReplManager(scope: Any, blackbox: Blackbox) : ScriptingReplManager

REPL manager that uses the IPC protocol defined in ScriptingProtocol.kt to communicate with a black box. Suitable for presenting arbitrary access to Kotlin/JVM state to scripting APIs. See Module.md for a detailed description of the REPL loop.

Constructors

ScriptingProtocolReplManager
Link copied to clipboard
fun ScriptingProtocolReplManager(scope: Any, blackbox: Blackbox)

Functions

autocomplete
Link copied to clipboard
open override fun autocomplete(command: String, cursorPos: Int?): AutocompleteResults
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
exec
Link copied to clipboard
open override fun exec(command: String): ExecResult
foreignExecLoop
Link copied to clipboard
fun foreignExecLoop()

Listens to requests for values from the black box, and replies to them, during script execution. Terminates loop after receiving a request with a the 'PassMic' flag.

getRequestResponse
Link copied to clipboard
fun getRequestResponse(packetToSend: ScriptingPacket, enforceValidity: Boolean = true, execLoop: () -> Unit = fun(){}): ScriptingPacket
hashCode
Link copied to clipboard
open fun hashCode(): Int
motd
Link copied to clipboard
open override fun motd(): String
terminate
Link copied to clipboard
open override fun terminate(): Exception?
toString
Link copied to clipboard
open fun toString(): String

Properties

blackbox
Link copied to clipboard
val blackbox: Blackbox
instanceSaver
Link copied to clipboard
val instanceSaver: MutableList<Any?>

ScriptingProtocol puts references to pre-tokenized returned objects in here. Should be cleared here at the end of each REPL execution.

scope
Link copied to clipboard
val scope: Any
scriptingProtocol
Link copied to clipboard
val scriptingProtocol: ScriptingProtocol

Sources

jvm source
Link copied to clipboard