Await completion of the started Run for the duration specified by atMost.
Await completion of the started Run for the duration specified by atMost. Strictly equivalent to:
Await.result(future, atMost)
Await completion of the started Run.
Await completion of the started Run. Strictly equivalent to
Await.result(future, Duration.Inf)
Close the communication channel.
Close the communication channel. Allows the VM to terminate if it is still waiting for callback. The JVM side **must** call close in order to be able to expect termination of the VM.
Calling stop on a [ComJSRunner]] automatically closes the channel.
A future that completes when the associated run has terminated.
A future that completes when the associated run has terminated.
Get all files that are passed to VM (libraries and code)
Get all files that are passed to VM (libraries and code)
Get files that are a library (i.e.
Get files that are a library (i.e. that do not run anything)
VM arguments excluding executable.
VM arguments excluding executable. Override to adapt. Overrider is responsible to add additionalArgs.
VM environment.
VM environment. Override to adapt.
Default is sys.env
and additionalEnv
PhantomJS doesn't support Function.prototype.bind.
PhantomJS doesn't support Function.prototype.bind. We polyfill it. https://github.com/ariya/phantomjs/issues/10522
Checks whether this async runner is still running.
Checks whether this async runner is still running. Strictly equivalent to
!future.isCompleted
pipe lines from input stream to JSConsole
pipe lines from input stream to JSConsole
Pipe stdin and stdout from/to VM
Pipe stdin and stdout from/to VM
Block until a message is received.
Block until a message is received. Throws a ComClosedExcpetion if the channel is closed before a message is received.
Send a message to the JS VM.
Send a message to the JS VM. Throws if the message cannot be sent.
send a bunch of JS files to a writer
send a bunch of JS files to a writer
send a bunch of JS files to an output stream
send a bunch of JS files to an output stream
Sends required data to VM Stdin (can throw)
Sends required data to VM Stdin (can throw)
Start the associated run and returns a Future that completes when the run terminates.
Start the associated run and returns a Future that completes when the run terminates. The returned Future is equivalent to the one returned by future.
Abort the associated run.
Abort the associated run. Also closes the communication channel.
Wait for the VM to terminate, verify exit code
Wait for the VM to terminate, verify exit code
if VM returned a non-zero code
In phantom.js, we include JS using HTML
In phantom.js, we include JS using HTML