javonet-ruby-sdk 2.5.8 → 2.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +30 -29
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libpython3.11.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/NetVersion90LatestPatch.runtimeconfig.json +10 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/NetVersionLatest.runtimeconfig.json +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/index.js +64 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/AbstractGeneratorHandler.js +0 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/CreateInstanceGeneratorHandler.js +27 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GeneratorHandler.js +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetInstanceFieldGeneratorHandler.js +26 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetStaticFieldGeneratorHandler.js +24 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/GetTypeGeneratorHandler.js +39 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/Handlers.js +58 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +33 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeStandaloneMethodGeneratorHandler.js +35 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +35 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/SharedArgumentNameHandler.js +15 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedClassInstanceHandler.js +4 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedClassNameHandler.js +10 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/handler/shared/SharedMethodNameHandler.js +9 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/SharedReturnTypeHandler.js +9 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedBodyHandler.js +18 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +29 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +21 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +31 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +21 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +33 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStandaloneMethodBodyHandler.js +39 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +39 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/internal/CommonGenerator.js +39 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/generator/internal/NodejsStringBuilder.js +17 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/internal/SharedHandlerType.js +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/generator/utils/StringUtils.js +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/AbstractHandler.js +12 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetItemHandler.js +3 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetRankHandler.js +5 -7
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayGetSizeHandler.js +3 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArrayHandler.js +2 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ArraySetItemHandler.js +4 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/CastingHandler.js +3 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/CreateClassInstanceHandler.js +36 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/DestructReferenceHandler.js +3 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/EnableNamespaceHandler.js +8 -11
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/EnableTypeHandler.js +8 -10
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetGlobalStaticFieldHandler.js +37 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetInstanceFieldHandler.js +35 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/GetStaticFieldHandler.js +36 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/GetTypeHandler.js +22 -21
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/Handler.js +12 -11
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeGlobalMethodHandler.js +43 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeInstanceMethodHandler.js +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeStandaloneMethodHandler.js +56 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/InvokeStaticMethodHandler.js +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/LoadLibraryHandler.js +4 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/ResolveReferenceHandler.js +13 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetGlobalStaticFieldHandler.js +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetInstanceFieldHandler.js +35 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/handler/SetStaticFieldHandler.js +33 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/handler/ValueHandler.js +3 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/interpreter/Interpreter.js +142 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/namespaceCache/NamespaceCache.js +12 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/CommandDeserializer.js +43 -48
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/CommandSerializer.js +4 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/TypeDeserializer.js +17 -15
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/protocol/TypeSerializer.js +6 -7
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/receiver/Receiver.js +32 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/receiver/ReceiverNative.js +3 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/referenceCache/ReferencesCache.js +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/transmitter/Transmitter.js +2 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWebsocket.js +33 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/transmitter/TransmitterWrapper.js +34 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{core → lib/core}/typeCache/TypeCache.js +12 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/core/webSocketClient/WebSocketClient.js +131 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/declarations.d.ts +64 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/ConfigRuntimeFactory.js +145 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/InvocationContext.js +454 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/Javonet.js +89 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeContext.js +266 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/RuntimeFactory.js +78 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/JsonFileResolver.js +101 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/sdk/tools/SdkExceptionHelper.js +79 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/Command.js +69 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/CommandType.js +6 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/ConnectionType.js +8 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/ExceptionType.js +6 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeLogger.js +30 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/RuntimeName.js +6 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/RuntimeNameHandler.js +34 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/StringEncodingMode.js +9 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/Type.js +5 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/connectionData/IConnectionData.js +4 -6
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/InMemoryConnectionData.js +35 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/TcpConnectionData.js +77 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/connectionData/WsConnectionData.js +50 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/exception/ExceptionSerializer.js +24 -31
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/{utils → lib/utils}/exception/ExceptionThrower.js +36 -30
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/REGEX.js +2 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/rng.js +12 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/stringify.js +51 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/v4.js +27 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/lib/utils/uuid/validate.js +6 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Class/Load/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Data/UUID/UUID.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/FFI/Platypus/Platypus.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/PPI/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Package/Stash/XS/XS.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Params/Util/Util.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/share/dist/FFI-Platypus/lib/libplfill.so +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +90 -90
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Scalar/Util/Numeric/Numeric.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +20 -20
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- metadata +105 -85
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/CreateInstanceGeneratorHandler.js +0 -17
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GeneratorHandler.js +0 -30
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetInstanceFieldGeneratorHandler.js +0 -18
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetStaticFieldGeneratorHandler.js +0 -17
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/GetTypeGeneratorHandler.js +0 -26
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/Handlers.js +0 -51
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/InvokeInstanceMethodGeneratorHandler.js +0 -18
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/InvokeStaticMethodGeneratorHandler.js +0 -20
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/SharedArgumentNameHandler.js +0 -11
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/SharedReturnTypeHandler.js +0 -10
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedBodyHandler.js +0 -14
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedCreateInstanceBodyHandler.js +0 -24
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetInstanceFieldBodyHandler.js +0 -19
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetStaticFieldBodyHandler.js +0 -27
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedGetTypeBodyHandler.js +0 -20
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedInvokeInstanceMethodBodyHandler.js +0 -27
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/handler/shared/body/SharedInvokeStaticMethodBodyHandler.js +0 -31
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/internal/CommonGenerator.js +0 -26
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/generator/internal/NodejsStringBuilder.js +0 -18
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/CreateClassInstanceHandler.js +0 -38
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetGlobalStaticFieldHandler.js +0 -39
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetInstanceFieldHandler.js +0 -35
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/GetStaticFieldHandler.js +0 -36
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeGlobalMethodHandler.js +0 -47
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeInstanceMethodHandler.js +0 -40
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/InvokeStaticMethodHandler.js +0 -40
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/ResolveReferenceHandler.js +0 -14
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetGlobalStaticFieldHandler.js +0 -44
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetInstanceFieldHandler.js +0 -35
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/handler/SetStaticFieldHandler.js +0 -33
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/interpreter/Interpreter.js +0 -69
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/receiver/Receiver.js +0 -26
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/transmitter/TransmitterWrapper.js +0 -28
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/webSocketClient/WebSocketClient.js +0 -134
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/Command.js +0 -66
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/ConnectionType.js +0 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/RuntimeLogger.js +0 -27
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/RuntimeNameHandler.js +0 -30
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/StringEncodingMode.js +0 -6
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/InMemoryConnectionData.js +0 -28
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/TcpConnectionData.js +0 -69
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/WsConnectionData.js +0 -33
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/REGEX.js +0 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/rng.js +0 -12
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/stringify.js +0 -51
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/v4.js +0 -27
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/uuid/validate.js +0 -6
@@ -0,0 +1,454 @@
|
|
1
|
+
const Interpreter = require('../core/interpreter/Interpreter')
|
2
|
+
const Command = require('../utils/Command')
|
3
|
+
const CommandType = require('../utils/CommandType')
|
4
|
+
const ConnectionType = require('../utils/ConnectionType')
|
5
|
+
const ExceptionThrower = require('../utils/exception/ExceptionThrower')
|
6
|
+
|
7
|
+
/**
|
8
|
+
* InvocationContext is a class that represents a context for invoking commands.
|
9
|
+
* It implements several interfaces for different types of interactions.
|
10
|
+
* This class is used to construct chains of invocations, representing expressions of interaction that have not yet been executed.
|
11
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/invocation-context)
|
12
|
+
* @class
|
13
|
+
*/
|
14
|
+
class InvocationContext {
|
15
|
+
#runtimeName
|
16
|
+
#connectionData
|
17
|
+
#currentCommand
|
18
|
+
#responseCommand
|
19
|
+
#interpreter
|
20
|
+
// eslint-disable-next-line no-unused-private-class-members
|
21
|
+
#isExecuted
|
22
|
+
#resultValue
|
23
|
+
|
24
|
+
constructor(runtimeName, connectionData, command, isExecuted = false) {
|
25
|
+
this.#runtimeName = runtimeName
|
26
|
+
this.#connectionData = connectionData
|
27
|
+
this.#currentCommand = command
|
28
|
+
this.#responseCommand = null
|
29
|
+
this.#isExecuted = isExecuted
|
30
|
+
this.#interpreter = null
|
31
|
+
this.#resultValue = null
|
32
|
+
}
|
33
|
+
|
34
|
+
#createInstanceContext(localCommand) {
|
35
|
+
if (this.#connectionData.connectionType === ConnectionType.WEB_SOCKET) {
|
36
|
+
return new InvocationWsContext(
|
37
|
+
this.#runtimeName,
|
38
|
+
this.#connectionData,
|
39
|
+
this.#buildCommand(localCommand)
|
40
|
+
)
|
41
|
+
}
|
42
|
+
return new InvocationContext(
|
43
|
+
this.#runtimeName,
|
44
|
+
this.#connectionData,
|
45
|
+
this.#buildCommand(localCommand)
|
46
|
+
)
|
47
|
+
}
|
48
|
+
|
49
|
+
get_current_command() {
|
50
|
+
return this.#currentCommand
|
51
|
+
}
|
52
|
+
|
53
|
+
//destructor() {
|
54
|
+
// if (this.#currentCommand.commandType === CommandType.Reference) {
|
55
|
+
// this.#currentCommand = new Command(
|
56
|
+
// this.#runtimeName,
|
57
|
+
// CommandType.DestructReference,
|
58
|
+
// this.#currentCommand.payload
|
59
|
+
// );
|
60
|
+
// this.execute();
|
61
|
+
// }
|
62
|
+
//}
|
63
|
+
|
64
|
+
[Symbol.iterator] = function () {
|
65
|
+
if (this.#currentCommand.commandType !== CommandType.Reference) {
|
66
|
+
throw new Error('Object is not iterable')
|
67
|
+
}
|
68
|
+
let position = -1
|
69
|
+
let arraySize = this.getSize().execute().getValue()
|
70
|
+
|
71
|
+
return {
|
72
|
+
next: () => ({
|
73
|
+
value: this.getIndex(++position),
|
74
|
+
done: position >= arraySize,
|
75
|
+
}),
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Executes the current command.
|
81
|
+
* Because invocation context is building the intent of executing particular expression on target environment, we call the initial state of invocation context as non-materialized.
|
82
|
+
* The non-materialized context wraps either single command or chain of recursively nested commands.
|
83
|
+
* Commands are becoming nested through each invocation of methods on Invocation Context.
|
84
|
+
* Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
|
85
|
+
* Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
|
86
|
+
* @returns {InvocationContext} the InvocationContext after executing the command.
|
87
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
|
88
|
+
* @method
|
89
|
+
*/
|
90
|
+
execute() {
|
91
|
+
this.#interpreter = new Interpreter()
|
92
|
+
this.#responseCommand = this.#interpreter.execute(this.#currentCommand, this.#connectionData)
|
93
|
+
|
94
|
+
if (this.#responseCommand.commandType === CommandType.Exception) {
|
95
|
+
throw ExceptionThrower.throwException(this.#responseCommand)
|
96
|
+
}
|
97
|
+
|
98
|
+
if (this.#responseCommand.commandType === CommandType.CreateClassInstance) {
|
99
|
+
this.#currentCommand = this.#responseCommand
|
100
|
+
this.#isExecuted = true
|
101
|
+
return this
|
102
|
+
}
|
103
|
+
|
104
|
+
return new InvocationContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true)
|
105
|
+
}
|
106
|
+
|
107
|
+
/**
|
108
|
+
* Invokes a static method on the target runtime.
|
109
|
+
* @param {string} methodName - The name of the method to invoke.
|
110
|
+
* @param {...any} args - Method arguments.
|
111
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the static method.
|
112
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-static-method)
|
113
|
+
* @method
|
114
|
+
*/
|
115
|
+
invokeStaticMethod(methodName, ...args) {
|
116
|
+
let localCommand = new Command(this.#runtimeName, CommandType.InvokeStaticMethod, [
|
117
|
+
methodName,
|
118
|
+
...args,
|
119
|
+
])
|
120
|
+
return this.#createInstanceContext(localCommand)
|
121
|
+
}
|
122
|
+
|
123
|
+
/**
|
124
|
+
* Invokes a standalone method on the target runtime.
|
125
|
+
* @param {string} methodName - The name of the method to invoke.
|
126
|
+
* @param {...any} args - Method arguments.
|
127
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the static method.
|
128
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-static-method)
|
129
|
+
* @method
|
130
|
+
*/
|
131
|
+
invokeStandaloneMethod(methodName, ...args) {
|
132
|
+
let localCommand = new Command(this.#runtimeName, CommandType.InvokeStandaloneMethod, [
|
133
|
+
methodName,
|
134
|
+
...args,
|
135
|
+
])
|
136
|
+
return this.#createInstanceContext(localCommand)
|
137
|
+
}
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Retrieves the value of a static field from the target runtime.
|
141
|
+
* @param {string} fieldName - The name of the field to get.
|
142
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the static field.
|
143
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
|
144
|
+
* @method
|
145
|
+
*/
|
146
|
+
getStaticField(fieldName) {
|
147
|
+
let localCommand = new Command(this.#runtimeName, CommandType.GetStaticField, [fieldName])
|
148
|
+
return this.#createInstanceContext(localCommand)
|
149
|
+
}
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Sets the value of a static field in the target runtime.
|
153
|
+
* @param {string} fieldName - The name of the field to set.
|
154
|
+
* @param {any} value - The new value of the field.
|
155
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the static field.
|
156
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-static-fields-and-properties)
|
157
|
+
* @method
|
158
|
+
*/
|
159
|
+
setStaticField(fieldName, value) {
|
160
|
+
let localCommand = new Command(this.#runtimeName, CommandType.SetStaticField, [fieldName, value])
|
161
|
+
return this.#createInstanceContext(localCommand)
|
162
|
+
}
|
163
|
+
|
164
|
+
/**
|
165
|
+
* Creates a new instance of a class in the target runtime.
|
166
|
+
* @param {...any} args - The arguments to pass to the class constructor
|
167
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to create the instance.
|
168
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/creating-instance-and-calling-instance-methods)
|
169
|
+
* @method
|
170
|
+
*/
|
171
|
+
createInstance(...args) {
|
172
|
+
let localCommand = new Command(this.#runtimeName, CommandType.CreateClassInstance, args)
|
173
|
+
return this.#createInstanceContext(localCommand)
|
174
|
+
}
|
175
|
+
|
176
|
+
/**
|
177
|
+
* Retrieves the value of an instance field from the target runtime.
|
178
|
+
* @param {string} fieldName - The name of the field to get.
|
179
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the instance field.
|
180
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
|
181
|
+
* @method
|
182
|
+
*/
|
183
|
+
getInstanceField(fieldName) {
|
184
|
+
let localCommand = new Command(this.#runtimeName, CommandType.GetInstanceField, [fieldName])
|
185
|
+
return this.#createInstanceContext(localCommand)
|
186
|
+
}
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Sets the value of an instance field in the target runtime.
|
190
|
+
* @param {string} fieldName - The name of the field to set.
|
191
|
+
* @param {any} value - The new value of the field.
|
192
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the instance field.
|
193
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/fields-and-properties/getting-and-setting-values-for-instance-fields-and-properties)
|
194
|
+
* @method
|
195
|
+
*/
|
196
|
+
setInstanceField(fieldName, value) {
|
197
|
+
let localCommand = new Command(this.#runtimeName, CommandType.SetInstanceField, [fieldName, value])
|
198
|
+
return this.#createInstanceContext(localCommand)
|
199
|
+
}
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Invokes an instance method on the target runtime.
|
203
|
+
* @param {string} methodName - The name of the method to invoke.
|
204
|
+
* @param {...any} args - Method arguments.
|
205
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the instance method.
|
206
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/calling-methods/invoking-instance-method)
|
207
|
+
* @method
|
208
|
+
*/
|
209
|
+
invokeInstanceMethod(methodName, ...args) {
|
210
|
+
let localCommand = new Command(this.#runtimeName, CommandType.InvokeInstanceMethod, [
|
211
|
+
methodName,
|
212
|
+
...args,
|
213
|
+
])
|
214
|
+
return this.#createInstanceContext(localCommand)
|
215
|
+
}
|
216
|
+
|
217
|
+
/**
|
218
|
+
* Retrieves the value at a specific index in an array from the target runtime.
|
219
|
+
* @param {...any} indexes - the arguments to pass to the array getter. The first argument should be the index.
|
220
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the index.
|
221
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
|
222
|
+
* @method
|
223
|
+
*/
|
224
|
+
getIndex(...indexes) {
|
225
|
+
let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetItem, indexes)
|
226
|
+
return this.#createInstanceContext(localCommand)
|
227
|
+
}
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Sets the value at a specific index in an array in the target runtime.
|
231
|
+
* @param {number[]} indexes - The index to set the value at.
|
232
|
+
* @param {any} value - The value to set at the index.
|
233
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to set the index.
|
234
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
|
235
|
+
* @method
|
236
|
+
*/
|
237
|
+
setIndex(indexes, value) {
|
238
|
+
let localCommand = new Command(this.#runtimeName, CommandType.ArraySetItem, [indexes, value])
|
239
|
+
return this.#createInstanceContext(localCommand)
|
240
|
+
}
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Retrieves the size of an array from the target runtime.
|
244
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the size.
|
245
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
|
246
|
+
* @method
|
247
|
+
*/
|
248
|
+
getSize() {
|
249
|
+
let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetSize, [])
|
250
|
+
return this.#createInstanceContext(localCommand)
|
251
|
+
}
|
252
|
+
|
253
|
+
/**
|
254
|
+
* Retrieves the rank of an array from the target runtime.
|
255
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the rank.
|
256
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/one-dimensional-arrays)
|
257
|
+
* @method
|
258
|
+
*/
|
259
|
+
getRank() {
|
260
|
+
let localCommand = new Command(this.#runtimeName, CommandType.ArrayGetRank, [])
|
261
|
+
return this.#createInstanceContext(localCommand)
|
262
|
+
}
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Invokes a generic static method on the target runtime.
|
266
|
+
* @param {string} methodName - The name of the method to invoke.
|
267
|
+
* @param {...any} args - Method arguments.
|
268
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic static method.
|
269
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-static-method)
|
270
|
+
* @method
|
271
|
+
*/
|
272
|
+
invokeGenericStaticMethod(methodName, ...args) {
|
273
|
+
let localCommand = new Command(this.#runtimeName, CommandType.InvokeGenericStaticMethod, [
|
274
|
+
methodName,
|
275
|
+
...args,
|
276
|
+
])
|
277
|
+
return this.#createInstanceContext(localCommand)
|
278
|
+
}
|
279
|
+
|
280
|
+
/**
|
281
|
+
* Invokes a generic method on the target runtime.
|
282
|
+
* @param {string} methodName - The name of the method to invoke.
|
283
|
+
* @param {...any} args - Method arguments.
|
284
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to invoke the generic method.
|
285
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/generics/calling-generic-instance-method)
|
286
|
+
* @method
|
287
|
+
*/
|
288
|
+
invokeGenericMethod(methodName, ...args) {
|
289
|
+
let localCommand = new Command(this.#runtimeName, CommandType.InvokeGenericMethod, [
|
290
|
+
methodName,
|
291
|
+
...args,
|
292
|
+
])
|
293
|
+
return this.#createInstanceContext(localCommand)
|
294
|
+
}
|
295
|
+
|
296
|
+
/**
|
297
|
+
* Retrieves the name of an enum from the target runtime.
|
298
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum name.
|
299
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
|
300
|
+
* @method
|
301
|
+
*/
|
302
|
+
getEnumName() {
|
303
|
+
let localCommand = new Command(this.#runtimeName, CommandType.GetEnumName, [])
|
304
|
+
return this.#createInstanceContext(localCommand)
|
305
|
+
}
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Retrieves the value of an enum from the target runtime.
|
309
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the enum value.
|
310
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/enums/using-enum-type)
|
311
|
+
* @method
|
312
|
+
*/
|
313
|
+
getEnumValue() {
|
314
|
+
let localCommand = new Command(this.#runtimeName, CommandType.GetEnumValue, [])
|
315
|
+
return this.#createInstanceContext(localCommand)
|
316
|
+
}
|
317
|
+
|
318
|
+
/**
|
319
|
+
* Retrieves the value of a reference from the target runtime.
|
320
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to get the ref value.
|
321
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/methods-arguments/passing-arguments-by-reference-with-ref-keyword)
|
322
|
+
* @method
|
323
|
+
*/
|
324
|
+
getRefValue() {
|
325
|
+
let localCommand = new Command(this.#runtimeName, CommandType.GetRefValue, [])
|
326
|
+
return this.#createInstanceContext(localCommand)
|
327
|
+
}
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Creates a null object of a specific type on the target runtime.
|
331
|
+
*
|
332
|
+
* @returns {InvocationContext} An InvocationContext instance with the command to create a null object.
|
333
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/null-handling/create-null-object)
|
334
|
+
* @method
|
335
|
+
*/
|
336
|
+
createNull() {
|
337
|
+
let localCommand = new Command(this.#runtimeName, CommandType.CreateNull, [])
|
338
|
+
return this.#createInstanceContext(localCommand)
|
339
|
+
}
|
340
|
+
|
341
|
+
/**
|
342
|
+
* Retrieves an array from the target runtime.
|
343
|
+
* @returns {InvocationContext} A new InvocationContext instance that wraps the command to retrieve the array.
|
344
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/arrays-and-collections/retrieve-array)
|
345
|
+
* @method
|
346
|
+
*/
|
347
|
+
retrieveArray() {
|
348
|
+
let localCommand = new Command(this.#runtimeName, CommandType.RetrieveArray, [])
|
349
|
+
let localInvCtx = new InvocationContext(
|
350
|
+
this.#runtimeName,
|
351
|
+
this.#connectionData,
|
352
|
+
this.#buildCommand(localCommand)
|
353
|
+
)
|
354
|
+
localInvCtx.execute()
|
355
|
+
return localInvCtx.#responseCommand.payload
|
356
|
+
}
|
357
|
+
|
358
|
+
/**
|
359
|
+
* Returns the primitive value from the target runtime. This could be any primitive type in JavaScript,
|
360
|
+
* such as int, boolean, byte, char, long, double, float, etc.
|
361
|
+
* @returns {Command} The value of the current command.
|
362
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
|
363
|
+
* @method
|
364
|
+
*/
|
365
|
+
|
366
|
+
getValue() {
|
367
|
+
this.#resultValue = this.#currentCommand.payload[0]
|
368
|
+
return this.#resultValue
|
369
|
+
}
|
370
|
+
|
371
|
+
#buildCommand = function (command) {
|
372
|
+
for (let i = 0; i < command.payload.length; i++) {
|
373
|
+
command.payload[i] = this.#encapsulatePayloadItem(command.payload[i])
|
374
|
+
}
|
375
|
+
return command.prependArgToPayload(this.#currentCommand)
|
376
|
+
}
|
377
|
+
|
378
|
+
#encapsulatePayloadItem = function (payloadItem) {
|
379
|
+
// eslint-disable-next-line valid-typeof
|
380
|
+
if (typeof payloadItem === 'Command' || payloadItem instanceof Command) {
|
381
|
+
for (let i = 0; i < payloadItem.payload.length; i++) {
|
382
|
+
payloadItem.payload[i] = this.#encapsulatePayloadItem(payloadItem.payload[i])
|
383
|
+
}
|
384
|
+
return payloadItem
|
385
|
+
// eslint-disable-next-line valid-typeof
|
386
|
+
} else if (typeof payloadItem === 'InvocationContext' || payloadItem instanceof InvocationContext) {
|
387
|
+
return payloadItem.get_current_command()
|
388
|
+
} else if (payloadItem instanceof Array) {
|
389
|
+
for (let i = 0; i < payloadItem.length; i++) {
|
390
|
+
payloadItem[i] = this.#encapsulatePayloadItem(payloadItem[i])
|
391
|
+
}
|
392
|
+
return new Command(this.runtimeName, CommandType.Array, payloadItem)
|
393
|
+
} else {
|
394
|
+
return new Command(this.runtimeName, CommandType.Value, [payloadItem])
|
395
|
+
}
|
396
|
+
}
|
397
|
+
}
|
398
|
+
|
399
|
+
class InvocationWsContext extends InvocationContext {
|
400
|
+
#runtimeName
|
401
|
+
#connectionData
|
402
|
+
#currentCommand
|
403
|
+
#responseCommand
|
404
|
+
#interpreter
|
405
|
+
// eslint-disable-next-line no-unused-private-class-members
|
406
|
+
#isExecuted
|
407
|
+
// eslint-disable-next-line no-unused-private-class-members
|
408
|
+
#resultValue
|
409
|
+
|
410
|
+
constructor(runtimeName, connectionData, command, isExecuted = false) {
|
411
|
+
super(runtimeName, connectionData, command, isExecuted)
|
412
|
+
|
413
|
+
this.#runtimeName = runtimeName
|
414
|
+
this.#connectionData = connectionData
|
415
|
+
this.#currentCommand = command
|
416
|
+
this.#responseCommand = null
|
417
|
+
this.#isExecuted = isExecuted
|
418
|
+
this.#interpreter = null
|
419
|
+
this.#resultValue = null
|
420
|
+
}
|
421
|
+
|
422
|
+
/**
|
423
|
+
* Executes the current command.
|
424
|
+
* Because invocation context is building the intent of executing particular expression on target environment, we call the initial state of invocation context as non-materialized.
|
425
|
+
* The non-materialized context wraps either single command or chain of recursively nested commands.
|
426
|
+
* Commands are becoming nested through each invocation of methods on Invocation Context.
|
427
|
+
* Each invocation triggers the creation of new Invocation Context instance wrapping the current command with new parent command valid for invoked method.
|
428
|
+
* Developer can decide on any moment of the materialization for the context taking full control of the chunks of the expression being transferred and processed on target runtime.
|
429
|
+
* @returns {InvocationContext} the InvocationContext after executing the command.
|
430
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
|
431
|
+
* @method
|
432
|
+
*/
|
433
|
+
async execute() {
|
434
|
+
this.#interpreter = new Interpreter()
|
435
|
+
this.#responseCommand = await this.#interpreter.executeAsync(
|
436
|
+
this.#currentCommand,
|
437
|
+
this.#connectionData
|
438
|
+
)
|
439
|
+
|
440
|
+
if (this.#responseCommand.commandType === CommandType.Exception) {
|
441
|
+
throw ExceptionThrower.throwException(this.#responseCommand)
|
442
|
+
}
|
443
|
+
|
444
|
+
if (this.#responseCommand.commandType === CommandType.CreateClassInstance) {
|
445
|
+
this.#currentCommand = this.#responseCommand
|
446
|
+
this.#isExecuted = true
|
447
|
+
return this
|
448
|
+
}
|
449
|
+
|
450
|
+
return new InvocationWsContext(this.#runtimeName, this.#connectionData, this.#responseCommand, true)
|
451
|
+
}
|
452
|
+
}
|
453
|
+
|
454
|
+
module.exports = { InvocationContext, InvocationWsContext }
|
@@ -0,0 +1,89 @@
|
|
1
|
+
const { RuntimeFactory, InMemoryConnectionData, WsConnectionData } = require('../..')
|
2
|
+
|
3
|
+
const Transmitter = require('../core/transmitter/Transmitter')
|
4
|
+
const ConfigRuntimeFactory = require('./ConfigRuntimeFactory')
|
5
|
+
const RuntimeLogger = require('../utils/RuntimeLogger')
|
6
|
+
const TcpConnectionData = require('../utils/connectionData/TcpConnectionData')
|
7
|
+
|
8
|
+
/**
|
9
|
+
* The Javonet class is a singleton class that serves as the entry point for interacting with Javonet.
|
10
|
+
* It provides methods to activate and initialize the Javonet SDK.
|
11
|
+
* It supports both in-memory and TCP connections.
|
12
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/javonet-static-class)
|
13
|
+
*/
|
14
|
+
class Javonet {
|
15
|
+
// Static block to initialize the Transmitter
|
16
|
+
static {
|
17
|
+
Transmitter.initialize()
|
18
|
+
//SDKExceptionHelper.sendExceptionToAppInsights("SdkMessage", "Javonet SDK initialized");
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Initializes Javonet using an in-memory channel on the same machine.
|
23
|
+
* @returns {RuntimeFactory} A RuntimeFactory instance configured for an in-memory connection.
|
24
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/in-memory-channel)
|
25
|
+
*/
|
26
|
+
static inMemory() {
|
27
|
+
return new RuntimeFactory(new InMemoryConnectionData())
|
28
|
+
}
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Initializes Javonet with a TCP connection to a remote machine.
|
32
|
+
* @param {TcpConnectionData} tcpConnectionData - The tcp connection data of the remote machine.
|
33
|
+
* @returns {RuntimeFactory} A RuntimeFactory instance configured for a TCP connection.
|
34
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/tcp-channel)
|
35
|
+
*/
|
36
|
+
static tcp(tcpConnectionData) {
|
37
|
+
return new RuntimeFactory(tcpConnectionData)
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Initializes Javonet with a WebSocket connection to a remote machine.
|
42
|
+
* @param {WsConnectionData} wsConnectionData - The WebSocket connection data of the remote machine.
|
43
|
+
* @returns {RuntimeFactory} A RuntimeFactory instance configured for a WebSocket connection.
|
44
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/websocket-channel)
|
45
|
+
*/
|
46
|
+
static ws(wsConnectionData) {
|
47
|
+
return new RuntimeFactory(wsConnectionData)
|
48
|
+
}
|
49
|
+
|
50
|
+
/**
|
51
|
+
* Initializes Javonet with a custom configuration file taken from external source.
|
52
|
+
* Currentyl supported: Configuration file in JSON format
|
53
|
+
* @param {string} configPath - Path to a configuration file.
|
54
|
+
* @returns {ConfigRuntimeFactory} A ConfigRuntimeFactory instance with configuration data.
|
55
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/configure-channel)
|
56
|
+
*/
|
57
|
+
static withConfig(configPath) {
|
58
|
+
return new ConfigRuntimeFactory(configPath)
|
59
|
+
}
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Activates Javonet with the provided license key.
|
63
|
+
* @param {string} licenseKey - The license key to activate Javonet.
|
64
|
+
* @returns {number} The activation status code.
|
65
|
+
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/getting-started/activating-javonet)
|
66
|
+
*/
|
67
|
+
static activate(licenseKey) {
|
68
|
+
return Transmitter.activate(licenseKey)
|
69
|
+
}
|
70
|
+
|
71
|
+
static getRuntimeInfo() {
|
72
|
+
return RuntimeLogger.getRuntimeInfo()
|
73
|
+
}
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Sets the configuration source for the Javonet SDK.
|
77
|
+
*
|
78
|
+
* @param {string} configSource - The configuration source.
|
79
|
+
*/
|
80
|
+
static setConfigSource(configSource) {
|
81
|
+
Transmitter.setConfigSource(configSource)
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
module.exports = {
|
86
|
+
Javonet,
|
87
|
+
TcpConnectionData,
|
88
|
+
WsConnectionData,
|
89
|
+
}
|