Class

org.scalajs.jsenv.nodejs.JSDOMNodeJSEnv

ComDOMNodeRunner

Related Doc: package JSDOMNodeJSEnv

Permalink

class ComDOMNodeRunner extends AsyncDOMNodeRunner with NodeComJSRunner

Attributes
protected
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ComDOMNodeRunner
  2. NodeComJSRunner
  3. ComJSRunner
  4. AsyncDOMNodeRunner
  5. AbstractDOMNodeRunner
  6. AbstractNodeRunner
  7. AsyncExtRunner
  8. AsyncJSRunner
  9. AbstractExtRunner
  10. JSInitFiles
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ComDOMNodeRunner(libs: Seq[ResolvedJSDependency], code: VirtualJSFile)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. final def await(atMost: Duration): Unit

    Permalink

    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
  6. final def await(): Unit

    Permalink

    Await completion of the started Run.

    Await completion of the started Run. Strictly equivalent to

    Await.result(future, Duration.Inf)
    Definition Classes
    AsyncJSRunner
  7. final def awaitOrStop(atMost: Duration): Unit

    Permalink

    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
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def close(): Unit

    Permalink

    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
    NodeComJSRunnerComJSRunner
  10. val code: VirtualJSFile

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  11. def codeWithJSDOMContext(): Seq[VirtualJSFile]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractDOMNodeRunner
  12. def console: JSConsole

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  13. final def customInitFiles(): Seq[VirtualJSFile]

    Permalink

    Custom initialization scripts, defined by the environment.

    Custom initialization scripts, defined by the environment.

    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    NodeComJSRunner → AnyRef
  17. def fixPercentConsole(): Seq[VirtualJSFile]

    Permalink

    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
  18. def future: Future[Unit]

    Permalink

    A future that completes when the associated run has terminated.

    A future that completes when the associated run has terminated.

    Definition Classes
    AsyncExtRunnerAsyncJSRunner
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  20. def getJSFiles(): Seq[VirtualJSFile]

    Permalink

    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
    AbstractDOMNodeRunnerAbstractExtRunner
  21. def getLibJSFiles(): Seq[VirtualJSFile]

    Permalink

    Libraries are loaded via scripts in Node.js

    Libraries are loaded via scripts in Node.js

    Attributes
    protected
    Definition Classes
    AbstractDOMNodeRunnerAbstractExtRunner
  22. def getVMArgs(): Seq[String]

    Permalink

    VM arguments excluding executable.

    VM arguments excluding executable. Override to adapt.

    The default value in ExternalJSEnv is args.

    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  23. def getVMEnv(): Map[String, String]

    Permalink

    VM environment.

    VM environment. Override to adapt.

    The default value in ExternalJSEnv is System.getenv().asScala.toMap ++ env.

    Attributes
    protected
    Definition Classes
    AbstractNodeRunnerAbstractExtRunner
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def initFiles(): Seq[VirtualJSFile]

    Permalink

    JS files used to setup VM

    JS files used to setup VM

    Attributes
    protected
    Definition Classes
    NodeComJSRunnerJSInitFiles
  26. def installSourceMap(): Seq[VirtualJSFile]

    Permalink

    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
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. final def isRunning(): Boolean

    Permalink

    Checks whether this async runner is still running.

    Checks whether this async runner is still running. Strictly equivalent to

    !future.isCompleted
    Definition Classes
    AsyncJSRunner
  29. val libCache: VirtualFileMaterializer

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractNodeRunner
  30. val libs: Seq[ResolvedJSDependency]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  31. def logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def pipeToConsole(in: InputStream, console: JSConsole): Unit

    Permalink

    pipe lines from input stream to JSConsole

    pipe lines from input stream to JSConsole

    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  36. final def pipeVMData(vmInst: Process): Unit

    Permalink

    Pipe stdin and stdout from/to VM

    Pipe stdin and stdout from/to VM

    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  37. def receive(timeout: Duration): String

    Permalink

    Blocks until a message is received and returns it.

    Blocks until a message is received and returns it.

    Definition Classes
    NodeComJSRunnerComJSRunner
    Exceptions thrown

    ComJSEnv.ComClosedException if the channel is closed before a message is received

    scala.concurrent.TimeoutException if the timeout expires before a message is received and the channel is still open

  38. final def receive(): String

    Permalink

    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

  39. def runtimeEnv(): Seq[VirtualJSFile]

    Permalink

    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
  40. def send(msg: String): Unit

    Permalink

    Send a message to the JS VM.

    Send a message to the JS VM. Throws if the message cannot be sent.

    Definition Classes
    NodeComJSRunnerComJSRunner
  41. final def sendJS(files: Seq[VirtualJSFile], out: Writer): Unit

    Permalink

    send a bunch of JS files to a writer

    send a bunch of JS files to a writer

    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  42. final def sendJS(files: Seq[VirtualJSFile], out: OutputStream): Unit

    Permalink

    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
  43. def sendVMStdin(out: OutputStream): Unit

    Permalink

    Sends required data to VM Stdin (can throw)

    Sends required data to VM Stdin (can throw)

    Attributes
    protected
    Definition Classes
    AbstractDOMNodeRunnerAbstractExtRunner
  44. def setupLoggerAndConsole(logger: Logger, console: JSConsole): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  45. def start(logger: Logger, console: JSConsole): Future[Unit]

    Permalink

    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
    AsyncExtRunnerAsyncJSRunner
  46. def startExternalJSEnv(): Unit

    Permalink

    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
  47. def startVM(): Process

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractExtRunner
  48. def stop(): Unit

    Permalink

    Abort the associated run.

    Abort the associated run. Also closes the communication channel.

    Definition Classes
    ComJSRunnerAsyncJSRunner
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  50. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def waitForVM(vmInst: Process): Unit

    Permalink

    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

  55. def writeJSFile(file: VirtualJSFile, writer: Writer): Unit

    Permalink

    write a single JS file to a writer using an include fct if appropriate uses require if the file exists on the filesystem

    write 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
    AbstractNodeRunnerAbstractExtRunner

Inherited from ComJSRunner

Inherited from AsyncDOMNodeRunner

Inherited from AbstractDOMNodeRunner

Inherited from AsyncJSRunner

Inherited from JSInitFiles

Inherited from AnyRef

Inherited from Any

Ungrouped