public class NodeRuntime extends V8Runtime
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FUNCTION_REQUIRE
The constant FUNCTION_REQUIRE.
|
static java.lang.String |
PROPERTY_DIRNAME
The constant PROPERTY_DIRNAME.
|
static java.lang.String |
PROPERTY_FILENAME
The constant PROPERTY_FILENAME.
|
ERROR_BYTE_BUFFER_MUST_BE_DIRECT, ERROR_HANDLE_MUST_BE_VALID, ERROR_SYMBOL_DESCRIPTION_CANNOT_BE_EMPTY, ERROR_THE_KEY_VALUE_PAIR_MUST_MATCH, ERROR_THE_PROPERTY_NAME_MUST_BE_EITHER_STRING_OR_SYMBOL, ERROR_VALUE_CANNOT_BE_A_V_8_CONTEXT, ERROR_VALUE_CANNOT_BE_A_V_8_MODULE, ERROR_VALUE_CANNOT_BE_A_V_8_SCRIPT
Modifier and Type | Method and Description |
---|---|
byte[] |
createSnapshot()
Create snapshot in byte array.
|
<Module extends INodeModule> |
getNodeModule(java.lang.Class<Module> nodeModuleClass)
Gets node module.
|
<Module extends INodeModule> |
getNodeModule(java.lang.String name,
java.lang.Class<Module> nodeModuleClass)
Gets node module.
|
int |
getNodeModuleCount()
Gets node module count.
|
boolean |
isStopping()
Is the event loop stopping.
|
void |
removeNodeModule(INodeModule iNodeModule)
Remove node module.
|
void |
setStopping(boolean stopping)
Sets the event loop stopping.
|
addGCEpilogueCallback, addGCPrologueCallback, addV8Module, allowEval, await, await, close, close, compileV8Module, compileV8Script, compileV8ValueFunction, containsV8Module, createV8Module, createV8ValueArray, createV8ValueArrayBuffer, createV8ValueArrayBuffer, createV8ValueBigInteger, createV8ValueBigInteger, createV8ValueBoolean, createV8ValueBooleanObject, createV8ValueDataView, createV8ValueDouble, createV8ValueDoubleObject, createV8ValueError, createV8ValueFunction, createV8ValueFunction, createV8ValueInteger, createV8ValueIntegerObject, createV8ValueLong, createV8ValueLongObject, createV8ValueMap, createV8ValueNull, createV8ValueObject, createV8ValuePromise, createV8ValueProxy, createV8ValueSet, createV8ValueString, createV8ValueStringObject, createV8ValueSymbol, createV8ValueTypedArray, createV8ValueUndefined, createV8ValueZonedDateTime, createV8ValueZonedDateTime, execute, getCallbackContext, getCallbackContextCount, getConverter, getExecutor, getExecutor, getExecutor, getExecutor, getGlobalObject, getGuard, getGuard, getGuard, getHandle, getJSRuntimeType, getLogger, getPromiseRejectCallback, getReferenceCount, getRuntimeOptions, getV8HeapSpaceStatistics, getV8HeapStatistics, getV8Inspector, getV8Inspector, getV8Internal, getV8Locker, getV8ModuleCount, getV8ModuleResolver, getV8Scope, getV8SharedMemoryStatistics, getVersion, hasException, hasPendingMessage, isClosed, isDead, isGCScheduled, isInUse, isPooled, lowMemoryNotification, objectIsFrozen, objectIsSealed, removeCallbackContext, removeGCEpilogueCallback, removeGCPrologueCallback, removeV8Module, removeV8Module, removeV8Module, removeV8Module, removeV8Modules, removeV8Modules, reportPendingMessages, requestGarbageCollectionForTesting, resetContext, resetIsolate, setConverter, setGCScheduled, setLogger, setPromiseRejectCallback, setV8ModuleResolver, terminateExecution, throwError, throwError, throwError, toObject, toV8Value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createV8ValueProxy, createV8ValueSymbol
toObject
public static final java.lang.String FUNCTION_REQUIRE
public static final java.lang.String PROPERTY_DIRNAME
public static final java.lang.String PROPERTY_FILENAME
public byte[] createSnapshot() throws JavetException
V8Runtime
createSnapshot
in class V8Runtime
JavetException
- the javet exception@CheckReturnValue public <Module extends INodeModule> Module getNodeModule(java.lang.Class<Module> nodeModuleClass) throws JavetException
Module
- the type parameternodeModuleClass
- the node module classJavetException
- the javet exception@CheckReturnValue public <Module extends INodeModule> Module getNodeModule(java.lang.String name, java.lang.Class<Module> nodeModuleClass) throws JavetException
Module
- the type parametername
- the namenodeModuleClass
- the node module classJavetException
- the javet exceptionpublic int getNodeModuleCount()
public boolean isStopping()
public void removeNodeModule(INodeModule iNodeModule) throws JavetException
iNodeModule
- the node moduleJavetException
- the javet exceptionpublic void setStopping(boolean stopping)
stopping
- true : the event queue will be skipped while the Node.js runtime is being closed, false : regular behavior