class ComNodeRunner extends AsyncNodeRunner with NodeComJSRunner
- Attributes
- protected
- Alphabetic
- By Inheritance
- ComNodeRunner
- NodeComJSRunner
- ComJSRunner
- AsyncNodeRunner
- AbstractBasicNodeRunner
- AbstractNodeRunner
- AsyncExtRunner
- AsyncJSRunner
- AbstractExtRunner
- JSInitFiles
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ComNodeRunner(libs: Seq[ResolvedJSDependency], code: VirtualJSFile)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
await(atMost: Duration): Unit
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)
- Definition Classes
- AsyncJSRunner
-
final
def
await(): Unit
Await completion of the started Run.
Await completion of the started Run. Strictly equivalent to
Await.result(future, Duration.Inf)
- Definition Classes
- AsyncJSRunner
-
final
def
awaitOrStop(atMost: Duration): Unit
Awaits completion of the started Run for the duration specified by
atMost
, or force it to stop.Awaits completion of the started Run for the duration specified by
atMost
, or force it to stop.If any exception is thrown while awaiting completion (including a TimeoutException), forces the runner to stop by calling
stop()
before rethrowing the exception.Strictly equivalent to:
try await(atMost) finally stop()
- Definition Classes
- AsyncJSRunner
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(): Unit
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.
- Definition Classes
- NodeComJSRunner → ComJSRunner
-
val
code: VirtualJSFile
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
console: JSConsole
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
final
def
customInitFiles(): Seq[VirtualJSFile]
Custom initialization scripts, defined by the environment.
Custom initialization scripts, defined by the environment.
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected
- Definition Classes
- NodeComJSRunner → AnyRef
-
def
fixPercentConsole(): Seq[VirtualJSFile]
File(s) to hack console.log to prevent if from changing
%%
to%
.File(s) to hack console.log to prevent if from changing
%%
to%
. Is used by initFiles, override to change/disable.- Attributes
- protected
- Definition Classes
- AbstractNodeRunner
-
def
future: Future[Unit]
A future that completes when the associated run has terminated.
A future that completes when the associated run has terminated.
- Definition Classes
- AsyncExtRunner → AsyncJSRunner
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getJSFiles(): Seq[VirtualJSFile]
Get all files that are passed to VM (libraries and code)
Get all files that are passed to VM (libraries and code)
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
getLibJSFiles(): Seq[VirtualJSFile]
Libraries are loaded via require in Node.js
Libraries are loaded via require in Node.js
- Attributes
- protected
- Definition Classes
- AbstractBasicNodeRunner → AbstractExtRunner
-
def
getVMArgs(): Seq[String]
VM arguments excluding executable.
VM arguments excluding executable. Override to adapt. Overrider is responsible to add additionalArgs.
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
getVMEnv(): Map[String, String]
VM environment.
VM environment. Override to adapt.
Default is
sys.env
and additionalEnv- Attributes
- protected
- Definition Classes
- AbstractNodeRunner → AbstractExtRunner
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
initFiles(): Seq[VirtualJSFile]
JS files used to setup VM
JS files used to setup VM
- Attributes
- protected
- Definition Classes
- NodeComJSRunner → JSInitFiles
-
def
installSourceMap(): Seq[VirtualJSFile]
File(s) to automatically install source-map-support.
File(s) to automatically install source-map-support. Is used by initFiles, override to change/disable.
- Attributes
- protected
- Definition Classes
- AbstractNodeRunner
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
isRunning(): Boolean
Checks whether this async runner is still running.
Checks whether this async runner is still running. Strictly equivalent to
!future.isCompleted
- Definition Classes
- AsyncJSRunner
-
val
libCache: VirtualFileMaterializer
- Attributes
- protected[this]
- Definition Classes
- AbstractNodeRunner
-
val
libs: Seq[ResolvedJSDependency]
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
logger: Logger
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
pipeToConsole(in: InputStream, console: JSConsole): Unit
pipe lines from input stream to JSConsole
pipe lines from input stream to JSConsole
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
final
def
pipeVMData(vmInst: Process): Unit
Pipe stdin and stdout from/to VM
Pipe stdin and stdout from/to VM
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
receive(timeout: Duration): String
Blocks until a message is received and returns it.
Blocks until a message is received and returns it.
- Definition Classes
- NodeComJSRunner → ComJSRunner
- Exceptions thrown
ComJSEnv.ComClosedException
if the channel is closed before a message is receivedscala.concurrent.TimeoutException
if the timeout expires before a message is received and the channel is still open
-
final
def
receive(): String
Blocks until a message is received and returns it.
Blocks until a message is received and returns it.
- Definition Classes
- ComJSRunner
- Exceptions thrown
ComJSEnv.ComClosedException
if the channel is closed before a message is received
-
def
requireLibrary(dep: ResolvedJSDependency): VirtualJSFile
Rewrites a library virtual file to a require statement if possible
Rewrites a library virtual file to a require statement if possible
- Attributes
- protected
- Definition Classes
- AbstractBasicNodeRunner
-
def
runtimeEnv(): Seq[VirtualJSFile]
File(s) to define
ScalaJSEnv
. Defines
exitFunction. Is used by initFiles, override to change/disable.
File(s) to define
ScalaJSEnv
. Defines
exitFunction. Is used by initFiles, override to change/disable.
- Attributes
- protected
- Definition Classes
- AbstractNodeRunner
-
def
send(msg: String): Unit
Send a message to the JS VM.
Send a message to the JS VM. Throws if the message cannot be sent.
- Definition Classes
- NodeComJSRunner → ComJSRunner
-
final
def
sendJS(files: Seq[VirtualJSFile], out: Writer): Unit
send a bunch of JS files to a writer
send a bunch of JS files to a writer
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
final
def
sendJS(files: Seq[VirtualJSFile], out: OutputStream): Unit
send a bunch of JS files to an output stream
send a bunch of JS files to an output stream
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
sendVMStdin(out: OutputStream): Unit
Sends required data to VM Stdin (can throw)
Sends required data to VM Stdin (can throw)
- Attributes
- protected
- Definition Classes
- AbstractBasicNodeRunner → AbstractExtRunner
-
def
setupLoggerAndConsole(logger: Logger, console: JSConsole): Unit
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
start(logger: Logger, console: JSConsole): Future[Unit]
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.
- Definition Classes
- AsyncExtRunner → AsyncJSRunner
-
def
startExternalJSEnv(): Unit
Core functionality of start.
Core functionality of start.
Same as start but without a call to setupLoggerAndConsole and not returning future. Useful to be called in overrides of start.
- Attributes
- protected
- Definition Classes
- AsyncExtRunner
-
def
startVM(): Process
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
-
def
stop(): Unit
Abort the associated run.
Abort the associated run. Also closes the communication channel.
- Definition Classes
- ComJSRunner → AsyncJSRunner
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
waitForVM(vmInst: Process): Unit
Wait for the VM to terminate, verify exit code
Wait for the VM to terminate, verify exit code
- Attributes
- protected
- Definition Classes
- AbstractExtRunner
- Exceptions thrown
ExternalJSEnv.NonZeroExitException
if VM returned a non-zero code
-
def
writeJSFile(file: VirtualJSFile, writer: Writer): Unit
write a single JS file to a writer using an include fct if appropriate uses
require
if the file exists on the filesystemwrite a single JS file to a writer using an include fct if appropriate uses
require
if the file exists on the filesystem- Attributes
- protected
- Definition Classes
- AbstractNodeRunner → AbstractExtRunner