javonet-ruby-sdk 2.5.4 → 2.5.6
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/javonet-ruby-sdk.gemspec +1 -1
- 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/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/libJavonetRubyRuntimeNative.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 +18 -18
- 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/libJavonetRubyRuntimeNative.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/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/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/libJavonetRubyRuntimeNative.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/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/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/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/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/core/transmitter/Transmitter.js +6 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/transmitter/TransmitterWrapper.js +3 -4
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/Nice/Try.pm +215 -5
- 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 +89 -89
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitter.pm +4 -23
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +3 -3
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Javonet.pm +13 -34
- 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/Perl/Windows/X64/deps/lib/perl5/Nice/Try.pm +215 -5
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitter.pm +4 -23
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +3 -3
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Javonet.pm +13 -34
- 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/transmitter/TransmitterWrapper.py +3 -6
- 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/Ruby/Linux/X64/core/interpreter/interpreter.rb +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/command_serializer.rb +18 -59
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/type_serializer.rb +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/receiver/receiver.rb +4 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter_wrapper.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/utils/runtime_logger.rb +16 -8
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/utils/tcp_connection_data.rb +4 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/interpreter/interpreter.rb +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/command_serializer.rb +18 -59
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/type_serializer.rb +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/receiver/receiver.rb +4 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter_wrapper.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/utils/runtime_logger.rb +16 -8
- data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/utils/tcp_connection_data.rb +4 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/interpreter/interpreter.rb +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/command_serializer.rb +18 -59
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/type_serializer.rb +23 -0
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/receiver/receiver.rb +4 -2
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter_wrapper.rb +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/utils/runtime_logger.rb +16 -8
- data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/utils/tcp_connection_data.rb +4 -0
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- data/lib/javonet-ruby-sdk/core/interpreter/interpreter.rb +4 -4
- data/lib/javonet-ruby-sdk/core/protocol/command_serializer.rb +18 -59
- data/lib/javonet-ruby-sdk/core/protocol/type_serializer.rb +23 -0
- data/lib/javonet-ruby-sdk/core/receiver/receiver.rb +4 -2
- data/lib/javonet-ruby-sdk/core/transmitter/transmitter.rb +1 -1
- data/lib/javonet-ruby-sdk/core/transmitter/transmitter_wrapper.rb +1 -1
- data/lib/javonet-ruby-sdk/sdk/config_runtime_factory.rb +2 -0
- data/lib/javonet-ruby-sdk/sdk/invocation_context.rb +8 -8
- data/lib/javonet-ruby-sdk/sdk/javonet.rb +7 -13
- data/lib/javonet-ruby-sdk/utils/runtime_logger.rb +16 -8
- data/lib/javonet-ruby-sdk/utils/tcp_connection_data.rb +4 -0
- metadata +4 -4
@@ -3,6 +3,29 @@ require_relative '../../utils/string_encoding_mode'
|
|
3
3
|
|
4
4
|
class TypeSerializer
|
5
5
|
|
6
|
+
def self.serialize_primitive(payload_item)
|
7
|
+
if payload_item.nil?
|
8
|
+
return TypeSerializer.serialize_nil
|
9
|
+
elsif [true, false].include? payload_item
|
10
|
+
return TypeSerializer.serialize_bool(payload_item)
|
11
|
+
elsif payload_item.is_a? Integer
|
12
|
+
if (-2 ** 31..2 ** 31).include?(payload_item)
|
13
|
+
return TypeSerializer.serialize_int(payload_item)
|
14
|
+
elsif (-2 ** 63..2 ** 63).include?(payload_item)
|
15
|
+
return TypeSerializer.serialize_longlong(payload_item)
|
16
|
+
else
|
17
|
+
return TypeSerializer.serialize_ullong(payload_item)
|
18
|
+
end
|
19
|
+
elsif payload_item.is_a? String
|
20
|
+
return TypeSerializer.serialize_string(payload_item)
|
21
|
+
elsif payload_item.is_a? Float
|
22
|
+
return TypeSerializer.serialize_double(payload_item)
|
23
|
+
elsif payload_item.is_a?
|
24
|
+
else
|
25
|
+
raise Exception.new("Payload not supported in command serializer")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
6
29
|
def self.serialize_command(command)
|
7
30
|
length = [command.payload.length].pack("i").bytes
|
8
31
|
return [Type::COMMAND] + length + [command.runtime_name, command.command_type]
|
@@ -1,13 +1,15 @@
|
|
1
1
|
require_relative '../interpreter/interpreter'
|
2
|
+
require_relative '../../utils/runtime_logger'
|
3
|
+
require_relative '../protocol/command_serializer'
|
2
4
|
|
3
5
|
class Receiver
|
4
6
|
|
5
7
|
def initialize
|
6
|
-
|
8
|
+
RuntimeLogger.print_runtime_info
|
7
9
|
end
|
8
10
|
|
9
11
|
def send_command(message_array, message_array_len)
|
10
|
-
|
12
|
+
CommandSerializer.new.serialize(Interpreter.new.process(message_array))
|
11
13
|
end
|
12
14
|
|
13
15
|
def heart_beat(message_array, message_array_len)
|
@@ -23,7 +23,7 @@ class Transmitter
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.activate(license_key)
|
26
|
-
activation_result = TransmitterWrapper.Activate(license_key
|
26
|
+
activation_result = TransmitterWrapper.Activate(license_key)
|
27
27
|
if activation_result < 0
|
28
28
|
error_message = get_native_error
|
29
29
|
raise Exception.new "Javonet activation result: " + activation_result.to_s + ". Native error message: " + error_message
|
@@ -25,7 +25,7 @@ module TransmitterWrapper
|
|
25
25
|
|
26
26
|
attach_function :SendCommand, [:pointer, :int], :int
|
27
27
|
attach_function :ReadResponse, [:pointer, :int], :int
|
28
|
-
attach_function :Activate, [:pointer
|
28
|
+
attach_function :Activate, [:pointer], :int
|
29
29
|
attach_function :GetNativeError, [], :string
|
30
30
|
attach_function :SetConfigSource, [:pointer], :int
|
31
31
|
end
|
@@ -2,20 +2,28 @@ class RuntimeLogger
|
|
2
2
|
|
3
3
|
@not_logged_yet = true
|
4
4
|
|
5
|
-
def self.get_runtime_info
|
5
|
+
def self.get_runtime_info(get_loaded_modules)
|
6
6
|
begin
|
7
|
-
"Ruby Managed Runtime Info:\n"
|
8
|
-
"Ruby Version: #{RUBY_VERSION}\n"
|
9
|
-
"Ruby Implementation: #{RUBY_ENGINE}\n"
|
10
|
-
"
|
7
|
+
runtime_info = "Ruby Managed Runtime Info:\n".force_encoding('UTF-8') +
|
8
|
+
"Ruby Version: #{RUBY_VERSION}\n".force_encoding('UTF-8') +
|
9
|
+
"Ruby Implementation: #{RUBY_ENGINE}\n".force_encoding('UTF-8') +
|
10
|
+
"Ruby Platform: #{RUBY_PLATFORM}\n".force_encoding('UTF-8') +
|
11
|
+
"Ruby Engine: #{RUBY_ENGINE}\n".force_encoding('UTF-8') +
|
12
|
+
"Ruby Engine Version: #{RUBY_ENGINE_VERSION}\n".force_encoding('UTF-8') +
|
13
|
+
"Current Directory: #{Dir.pwd}\n".force_encoding('UTF-8') +
|
14
|
+
"Ruby search path: " + $LOAD_PATH.join(", ").force_encoding('UTF-8') + "\n"
|
15
|
+
if get_loaded_modules
|
16
|
+
runtime_info += "Ruby loaded modules (excluding Javonet classes): " + $LOADED_FEATURES.reject { |feature| feature.include?("Binaries/Ruby") }.join(", ").force_encoding('UTF-8') + "\n"
|
17
|
+
end
|
18
|
+
return runtime_info
|
11
19
|
rescue => e
|
12
|
-
"Ruby Managed Runtime Info: Error while fetching runtime info"
|
20
|
+
"Ruby Managed Runtime Info: Error while fetching runtime info".force_encoding('UTF-8')
|
13
21
|
end
|
14
22
|
end
|
15
23
|
|
16
|
-
def self.print_runtime_info
|
24
|
+
def self.print_runtime_info(get_loaded_modules = true)
|
17
25
|
if @not_logged_yet
|
18
|
-
puts get_runtime_info
|
26
|
+
puts get_runtime_info(get_loaded_modules)
|
19
27
|
@not_logged_yet = false
|
20
28
|
end
|
21
29
|
end
|
@@ -5,8 +5,8 @@ require_relative '../handler/handler'
|
|
5
5
|
class Interpreter
|
6
6
|
@@handler = Handler.new
|
7
7
|
|
8
|
-
def execute(command, connection_type,
|
9
|
-
message_byte_array = CommandSerializer.new.serialize(command,
|
8
|
+
def execute(command, connection_type, connection_data)
|
9
|
+
message_byte_array = CommandSerializer.new.serialize(command, connection_data)
|
10
10
|
if command.runtime_name == RuntimeName::RUBY && connection_type == ConnectionType::IN_MEMORY
|
11
11
|
require_relative '../receiver/receiver'
|
12
12
|
response_byte_array = Receiver.new.send_command(message_byte_array, message_byte_array.length)
|
@@ -18,8 +18,8 @@ class Interpreter
|
|
18
18
|
CommandDeserializer.new(response_byte_array).deserialize
|
19
19
|
end
|
20
20
|
|
21
|
-
def process(byte_array
|
21
|
+
def process(byte_array)
|
22
22
|
received_command = CommandDeserializer.new(byte_array).deserialize
|
23
|
-
|
23
|
+
@@handler.handle_command(received_command)
|
24
24
|
end
|
25
25
|
end
|
@@ -1,78 +1,37 @@
|
|
1
1
|
require_relative 'type_serializer'
|
2
|
-
require_relative '../../utils/
|
2
|
+
require_relative '../../utils/command'
|
3
3
|
require_relative '../../utils/runtime_name'
|
4
4
|
require_relative '../../utils/tcp_connection_data'
|
5
5
|
|
6
6
|
class CommandSerializer
|
7
|
-
|
8
7
|
def initialize
|
9
|
-
@
|
10
|
-
end
|
11
|
-
|
12
|
-
def serialize(root_command, connection_type = ConnectionType::IN_MEMORY, tcp_connection_data = nil, runtime_version = 0)
|
13
|
-
queue = []
|
14
|
-
queue.unshift(root_command)
|
15
|
-
self.insert_into_buffer([root_command.runtime_name, runtime_version])
|
16
|
-
self.insert_into_buffer([connection_type])
|
17
|
-
self.insert_into_buffer(self.serialize_tcp(tcp_connection_data))
|
18
|
-
self.insert_into_buffer([RuntimeName::RUBY, root_command.command_type])
|
19
|
-
self.serialize_recursively(queue)
|
8
|
+
@buffer = []
|
20
9
|
end
|
21
10
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
11
|
+
def serialize(root_command, connection_data = nil, runtime_version = 0)
|
12
|
+
insert_into_buffer([root_command.runtime_name, runtime_version])
|
13
|
+
if connection_data.nil?
|
14
|
+
insert_into_buffer([0, 0, 0, 0, 0, 0, 0])
|
15
|
+
else
|
16
|
+
insert_into_buffer(connection_data.serialize_connection_data)
|
25
17
|
end
|
26
|
-
|
18
|
+
insert_into_buffer([RuntimeName::PYTHON, root_command.command_type])
|
19
|
+
serialize_recursively(root_command)
|
20
|
+
@buffer
|
27
21
|
end
|
28
22
|
|
29
|
-
def
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
elsif payload_item.is_a? Integer
|
35
|
-
if (-2 ** 31..2 ** 31).include?(payload_item)
|
36
|
-
return TypeSerializer.serialize_int(payload_item)
|
37
|
-
elsif (-2 ** 63..2 ** 63).include?(payload_item)
|
38
|
-
return TypeSerializer.serialize_longlong(payload_item)
|
23
|
+
def serialize_recursively(command)
|
24
|
+
command.payload.each do |item|
|
25
|
+
if item.is_a?(Command)
|
26
|
+
insert_into_buffer(TypeSerializer.serialize_command(item))
|
27
|
+
serialize_recursively(item)
|
39
28
|
else
|
40
|
-
|
29
|
+
insert_into_buffer(TypeSerializer.serialize_primitive(item))
|
41
30
|
end
|
42
|
-
elsif payload_item.is_a? String
|
43
|
-
return TypeSerializer.serialize_string(payload_item)
|
44
|
-
elsif payload_item.is_a? Float
|
45
|
-
return TypeSerializer.serialize_double(payload_item)
|
46
|
-
elsif payload_item.is_a?
|
47
|
-
else
|
48
|
-
raise Exception.new("Payload not supported in command serializer")
|
49
31
|
end
|
50
32
|
end
|
51
33
|
|
52
34
|
def insert_into_buffer(arguments)
|
53
|
-
@
|
35
|
+
@buffer += arguments
|
54
36
|
end
|
55
|
-
|
56
|
-
def serialize_recursively(queue)
|
57
|
-
if queue.length == 0
|
58
|
-
return @byte_buffer
|
59
|
-
end
|
60
|
-
command = queue.shift
|
61
|
-
queue.unshift(command.drop_first_payload_argument)
|
62
|
-
if command.payload.length > 0
|
63
|
-
if command.payload[0].is_a? Command
|
64
|
-
inner_command = command.payload[0]
|
65
|
-
self.insert_into_buffer(TypeSerializer.serialize_command(inner_command))
|
66
|
-
queue.unshift(inner_command)
|
67
|
-
else
|
68
|
-
result = self.serialize_primitive(command.payload[0])
|
69
|
-
self.insert_into_buffer(result)
|
70
|
-
return self.serialize_recursively(queue)
|
71
|
-
end
|
72
|
-
else
|
73
|
-
queue.shift
|
74
|
-
end
|
75
|
-
self.serialize_recursively(queue)
|
76
|
-
end
|
77
|
-
|
78
37
|
end
|
@@ -3,6 +3,29 @@ require_relative '../../utils/string_encoding_mode'
|
|
3
3
|
|
4
4
|
class TypeSerializer
|
5
5
|
|
6
|
+
def self.serialize_primitive(payload_item)
|
7
|
+
if payload_item.nil?
|
8
|
+
return TypeSerializer.serialize_nil
|
9
|
+
elsif [true, false].include? payload_item
|
10
|
+
return TypeSerializer.serialize_bool(payload_item)
|
11
|
+
elsif payload_item.is_a? Integer
|
12
|
+
if (-2 ** 31..2 ** 31).include?(payload_item)
|
13
|
+
return TypeSerializer.serialize_int(payload_item)
|
14
|
+
elsif (-2 ** 63..2 ** 63).include?(payload_item)
|
15
|
+
return TypeSerializer.serialize_longlong(payload_item)
|
16
|
+
else
|
17
|
+
return TypeSerializer.serialize_ullong(payload_item)
|
18
|
+
end
|
19
|
+
elsif payload_item.is_a? String
|
20
|
+
return TypeSerializer.serialize_string(payload_item)
|
21
|
+
elsif payload_item.is_a? Float
|
22
|
+
return TypeSerializer.serialize_double(payload_item)
|
23
|
+
elsif payload_item.is_a?
|
24
|
+
else
|
25
|
+
raise Exception.new("Payload not supported in command serializer")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
6
29
|
def self.serialize_command(command)
|
7
30
|
length = [command.payload.length].pack("i").bytes
|
8
31
|
return [Type::COMMAND] + length + [command.runtime_name, command.command_type]
|
@@ -1,13 +1,15 @@
|
|
1
1
|
require_relative '../interpreter/interpreter'
|
2
|
+
require_relative '../../utils/runtime_logger'
|
3
|
+
require_relative '../protocol/command_serializer'
|
2
4
|
|
3
5
|
class Receiver
|
4
6
|
|
5
7
|
def initialize
|
6
|
-
|
8
|
+
RuntimeLogger.print_runtime_info
|
7
9
|
end
|
8
10
|
|
9
11
|
def send_command(message_array, message_array_len)
|
10
|
-
|
12
|
+
CommandSerializer.new.serialize(Interpreter.new.process(message_array))
|
11
13
|
end
|
12
14
|
|
13
15
|
def heart_beat(message_array, message_array_len)
|
@@ -23,7 +23,7 @@ class Transmitter
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.activate(license_key)
|
26
|
-
activation_result = TransmitterWrapper.Activate(license_key
|
26
|
+
activation_result = TransmitterWrapper.Activate(license_key)
|
27
27
|
if activation_result < 0
|
28
28
|
error_message = get_native_error
|
29
29
|
raise Exception.new "Javonet activation result: " + activation_result.to_s + ". Native error message: " + error_message
|
@@ -25,7 +25,7 @@ module TransmitterWrapper
|
|
25
25
|
|
26
26
|
attach_function :SendCommand, [:pointer, :int], :int
|
27
27
|
attach_function :ReadResponse, [:pointer, :int], :int
|
28
|
-
attach_function :Activate, [:pointer
|
28
|
+
attach_function :Activate, [:pointer], :int
|
29
29
|
attach_function :GetNativeError, [], :string
|
30
30
|
attach_function :SetConfigSource, [:pointer], :int
|
31
31
|
end
|
@@ -2,20 +2,28 @@ class RuntimeLogger
|
|
2
2
|
|
3
3
|
@not_logged_yet = true
|
4
4
|
|
5
|
-
def self.get_runtime_info
|
5
|
+
def self.get_runtime_info(get_loaded_modules)
|
6
6
|
begin
|
7
|
-
"Ruby Managed Runtime Info:\n"
|
8
|
-
"Ruby Version: #{RUBY_VERSION}\n"
|
9
|
-
"Ruby Implementation: #{RUBY_ENGINE}\n"
|
10
|
-
"
|
7
|
+
runtime_info = "Ruby Managed Runtime Info:\n".force_encoding('UTF-8') +
|
8
|
+
"Ruby Version: #{RUBY_VERSION}\n".force_encoding('UTF-8') +
|
9
|
+
"Ruby Implementation: #{RUBY_ENGINE}\n".force_encoding('UTF-8') +
|
10
|
+
"Ruby Platform: #{RUBY_PLATFORM}\n".force_encoding('UTF-8') +
|
11
|
+
"Ruby Engine: #{RUBY_ENGINE}\n".force_encoding('UTF-8') +
|
12
|
+
"Ruby Engine Version: #{RUBY_ENGINE_VERSION}\n".force_encoding('UTF-8') +
|
13
|
+
"Current Directory: #{Dir.pwd}\n".force_encoding('UTF-8') +
|
14
|
+
"Ruby search path: " + $LOAD_PATH.join(", ").force_encoding('UTF-8') + "\n"
|
15
|
+
if get_loaded_modules
|
16
|
+
runtime_info += "Ruby loaded modules (excluding Javonet classes): " + $LOADED_FEATURES.reject { |feature| feature.include?("Binaries/Ruby") }.join(", ").force_encoding('UTF-8') + "\n"
|
17
|
+
end
|
18
|
+
return runtime_info
|
11
19
|
rescue => e
|
12
|
-
"Ruby Managed Runtime Info: Error while fetching runtime info"
|
20
|
+
"Ruby Managed Runtime Info: Error while fetching runtime info".force_encoding('UTF-8')
|
13
21
|
end
|
14
22
|
end
|
15
23
|
|
16
|
-
def self.print_runtime_info
|
24
|
+
def self.print_runtime_info(get_loaded_modules = true)
|
17
25
|
if @not_logged_yet
|
18
|
-
puts get_runtime_info
|
26
|
+
puts get_runtime_info(get_loaded_modules)
|
19
27
|
@not_logged_yet = false
|
20
28
|
end
|
21
29
|
end
|
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.6
|
@@ -5,8 +5,8 @@ require_relative '../handler/handler'
|
|
5
5
|
class Interpreter
|
6
6
|
@@handler = Handler.new
|
7
7
|
|
8
|
-
def execute(command, connection_type,
|
9
|
-
message_byte_array = CommandSerializer.new.serialize(command,
|
8
|
+
def execute(command, connection_type, connection_data)
|
9
|
+
message_byte_array = CommandSerializer.new.serialize(command, connection_data)
|
10
10
|
if command.runtime_name == RuntimeName::RUBY && connection_type == ConnectionType::IN_MEMORY
|
11
11
|
require_relative '../receiver/receiver'
|
12
12
|
response_byte_array = Receiver.new.send_command(message_byte_array, message_byte_array.length)
|
@@ -18,8 +18,8 @@ class Interpreter
|
|
18
18
|
CommandDeserializer.new(response_byte_array).deserialize
|
19
19
|
end
|
20
20
|
|
21
|
-
def process(byte_array
|
21
|
+
def process(byte_array)
|
22
22
|
received_command = CommandDeserializer.new(byte_array).deserialize
|
23
|
-
|
23
|
+
@@handler.handle_command(received_command)
|
24
24
|
end
|
25
25
|
end
|
@@ -1,78 +1,37 @@
|
|
1
1
|
require_relative 'type_serializer'
|
2
|
-
require_relative '../../utils/
|
2
|
+
require_relative '../../utils/command'
|
3
3
|
require_relative '../../utils/runtime_name'
|
4
4
|
require_relative '../../utils/tcp_connection_data'
|
5
5
|
|
6
6
|
class CommandSerializer
|
7
|
-
|
8
7
|
def initialize
|
9
|
-
@
|
10
|
-
end
|
11
|
-
|
12
|
-
def serialize(root_command, connection_type = ConnectionType::IN_MEMORY, tcp_connection_data = nil, runtime_version = 0)
|
13
|
-
queue = []
|
14
|
-
queue.unshift(root_command)
|
15
|
-
self.insert_into_buffer([root_command.runtime_name, runtime_version])
|
16
|
-
self.insert_into_buffer([connection_type])
|
17
|
-
self.insert_into_buffer(self.serialize_tcp(tcp_connection_data))
|
18
|
-
self.insert_into_buffer([RuntimeName::RUBY, root_command.command_type])
|
19
|
-
self.serialize_recursively(queue)
|
8
|
+
@buffer = []
|
20
9
|
end
|
21
10
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
11
|
+
def serialize(root_command, connection_data = nil, runtime_version = 0)
|
12
|
+
insert_into_buffer([root_command.runtime_name, runtime_version])
|
13
|
+
if connection_data.nil?
|
14
|
+
insert_into_buffer([0, 0, 0, 0, 0, 0, 0])
|
15
|
+
else
|
16
|
+
insert_into_buffer(connection_data.serialize_connection_data)
|
25
17
|
end
|
26
|
-
|
18
|
+
insert_into_buffer([RuntimeName::PYTHON, root_command.command_type])
|
19
|
+
serialize_recursively(root_command)
|
20
|
+
@buffer
|
27
21
|
end
|
28
22
|
|
29
|
-
def
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
elsif payload_item.is_a? Integer
|
35
|
-
if (-2 ** 31..2 ** 31).include?(payload_item)
|
36
|
-
return TypeSerializer.serialize_int(payload_item)
|
37
|
-
elsif (-2 ** 63..2 ** 63).include?(payload_item)
|
38
|
-
return TypeSerializer.serialize_longlong(payload_item)
|
23
|
+
def serialize_recursively(command)
|
24
|
+
command.payload.each do |item|
|
25
|
+
if item.is_a?(Command)
|
26
|
+
insert_into_buffer(TypeSerializer.serialize_command(item))
|
27
|
+
serialize_recursively(item)
|
39
28
|
else
|
40
|
-
|
29
|
+
insert_into_buffer(TypeSerializer.serialize_primitive(item))
|
41
30
|
end
|
42
|
-
elsif payload_item.is_a? String
|
43
|
-
return TypeSerializer.serialize_string(payload_item)
|
44
|
-
elsif payload_item.is_a? Float
|
45
|
-
return TypeSerializer.serialize_double(payload_item)
|
46
|
-
elsif payload_item.is_a?
|
47
|
-
else
|
48
|
-
raise Exception.new("Payload not supported in command serializer")
|
49
31
|
end
|
50
32
|
end
|
51
33
|
|
52
34
|
def insert_into_buffer(arguments)
|
53
|
-
@
|
35
|
+
@buffer += arguments
|
54
36
|
end
|
55
|
-
|
56
|
-
def serialize_recursively(queue)
|
57
|
-
if queue.length == 0
|
58
|
-
return @byte_buffer
|
59
|
-
end
|
60
|
-
command = queue.shift
|
61
|
-
queue.unshift(command.drop_first_payload_argument)
|
62
|
-
if command.payload.length > 0
|
63
|
-
if command.payload[0].is_a? Command
|
64
|
-
inner_command = command.payload[0]
|
65
|
-
self.insert_into_buffer(TypeSerializer.serialize_command(inner_command))
|
66
|
-
queue.unshift(inner_command)
|
67
|
-
else
|
68
|
-
result = self.serialize_primitive(command.payload[0])
|
69
|
-
self.insert_into_buffer(result)
|
70
|
-
return self.serialize_recursively(queue)
|
71
|
-
end
|
72
|
-
else
|
73
|
-
queue.shift
|
74
|
-
end
|
75
|
-
self.serialize_recursively(queue)
|
76
|
-
end
|
77
|
-
|
78
37
|
end
|
@@ -3,6 +3,29 @@ require_relative '../../utils/string_encoding_mode'
|
|
3
3
|
|
4
4
|
class TypeSerializer
|
5
5
|
|
6
|
+
def self.serialize_primitive(payload_item)
|
7
|
+
if payload_item.nil?
|
8
|
+
return TypeSerializer.serialize_nil
|
9
|
+
elsif [true, false].include? payload_item
|
10
|
+
return TypeSerializer.serialize_bool(payload_item)
|
11
|
+
elsif payload_item.is_a? Integer
|
12
|
+
if (-2 ** 31..2 ** 31).include?(payload_item)
|
13
|
+
return TypeSerializer.serialize_int(payload_item)
|
14
|
+
elsif (-2 ** 63..2 ** 63).include?(payload_item)
|
15
|
+
return TypeSerializer.serialize_longlong(payload_item)
|
16
|
+
else
|
17
|
+
return TypeSerializer.serialize_ullong(payload_item)
|
18
|
+
end
|
19
|
+
elsif payload_item.is_a? String
|
20
|
+
return TypeSerializer.serialize_string(payload_item)
|
21
|
+
elsif payload_item.is_a? Float
|
22
|
+
return TypeSerializer.serialize_double(payload_item)
|
23
|
+
elsif payload_item.is_a?
|
24
|
+
else
|
25
|
+
raise Exception.new("Payload not supported in command serializer")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
6
29
|
def self.serialize_command(command)
|
7
30
|
length = [command.payload.length].pack("i").bytes
|
8
31
|
return [Type::COMMAND] + length + [command.runtime_name, command.command_type]
|
@@ -1,13 +1,15 @@
|
|
1
1
|
require_relative '../interpreter/interpreter'
|
2
|
+
require_relative '../../utils/runtime_logger'
|
3
|
+
require_relative '../protocol/command_serializer'
|
2
4
|
|
3
5
|
class Receiver
|
4
6
|
|
5
7
|
def initialize
|
6
|
-
|
8
|
+
RuntimeLogger.print_runtime_info
|
7
9
|
end
|
8
10
|
|
9
11
|
def send_command(message_array, message_array_len)
|
10
|
-
|
12
|
+
CommandSerializer.new.serialize(Interpreter.new.process(message_array))
|
11
13
|
end
|
12
14
|
|
13
15
|
def heart_beat(message_array, message_array_len)
|
@@ -23,7 +23,7 @@ class Transmitter
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.activate(license_key)
|
26
|
-
activation_result = TransmitterWrapper.Activate(license_key
|
26
|
+
activation_result = TransmitterWrapper.Activate(license_key)
|
27
27
|
if activation_result < 0
|
28
28
|
error_message = get_native_error
|
29
29
|
raise Exception.new "Javonet activation result: " + activation_result.to_s + ". Native error message: " + error_message
|
@@ -25,7 +25,7 @@ module TransmitterWrapper
|
|
25
25
|
|
26
26
|
attach_function :SendCommand, [:pointer, :int], :int
|
27
27
|
attach_function :ReadResponse, [:pointer, :int], :int
|
28
|
-
attach_function :Activate, [:pointer
|
28
|
+
attach_function :Activate, [:pointer], :int
|
29
29
|
attach_function :GetNativeError, [], :string
|
30
30
|
attach_function :SetConfigSource, [:pointer], :int
|
31
31
|
end
|
@@ -3,6 +3,7 @@ require_relative './internal/abstract_config_runtime_factory'
|
|
3
3
|
require_relative './runtime_context'
|
4
4
|
require_relative './../utils/connection_type'
|
5
5
|
require_relative './tools/json_file_resolver'
|
6
|
+
require_relative './../core/transmitter/transmitter'
|
6
7
|
|
7
8
|
# The ConfigRuntimeFactory class implements the AbstractConfigRuntimeFactory interface and provides methods for creating runtime contexts.
|
8
9
|
# Each method corresponds to a specific runtime (CLR, JVM, .NET Core, Perl, Ruby, Node.js, Python) and returns a RuntimeContext instance for that runtime.
|
@@ -11,6 +12,7 @@ class ConfigRuntimeFactory < AbstractConfigRuntimeFactory
|
|
11
12
|
|
12
13
|
def initialize(path)
|
13
14
|
@path = path
|
15
|
+
Transmitter.set_config_source(path)
|
14
16
|
end
|
15
17
|
|
16
18
|
# Creates a RuntimeContext instance to interact with CLR runtime.
|
@@ -22,14 +22,14 @@ class InvocationContext < AbstractInvocationContext
|
|
22
22
|
# ObjectSpace.define_finalizer(self, self.finalize(@current_command, @is_executed, @interpreter, @connection_type, @tcp_ip_address))
|
23
23
|
end
|
24
24
|
|
25
|
-
def finalize(command, is_executed, interpreter, connection_type, tcp_ip_address)
|
26
|
-
proc do
|
27
|
-
if command.command_type == CommandType::REFERENCE && is_executed == true
|
28
|
-
destruct_command = Command.new(@runtime_name, CommandType::DESTRUCT_REFERENCE, command.payload)
|
29
|
-
interpreter.execute(destruct_command, connection_type, tcp_ip_address)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
25
|
+
# def finalize(command, is_executed, interpreter, connection_type, tcp_ip_address)
|
26
|
+
# proc do
|
27
|
+
# if command.command_type == CommandType::REFERENCE && is_executed == true
|
28
|
+
# destruct_command = Command.new(@runtime_name, CommandType::DESTRUCT_REFERENCE, command.payload)
|
29
|
+
# interpreter.execute(destruct_command, connection_type, tcp_ip_address)
|
30
|
+
# end
|
31
|
+
# end
|
32
|
+
# end
|
33
33
|
|
34
34
|
def iterator
|
35
35
|
if not [CommandType::REFERENCE, CommandType::ARRAY_GET_ITEM, CommandType::ARRAY_SET_ITEM].include? @current_command.command_type
|
@@ -2,21 +2,18 @@ require_relative './runtime_factory'
|
|
2
2
|
require_relative './config_runtime_factory'
|
3
3
|
require_relative './../utils/connection_type'
|
4
4
|
require_relative './../utils/tcp_connection_data'
|
5
|
+
require_relative './../utils/runtime_logger'
|
5
6
|
require_relative './../core/transmitter/transmitter'
|
6
7
|
require_relative './tools/sdk_exception_helper'
|
7
8
|
|
9
|
+
|
8
10
|
# The Javonet class is a singleton class that serves as the entry point for interacting with Javonet.
|
9
11
|
# It provides methods to activate and initialize the Javonet SDK.
|
10
12
|
# It supports both in-memory and TCP connections.
|
11
13
|
# @see Refer to this {https://www.javonet.com/guides/v2/ruby/foundations/javonet-static-class article on Javonet Guides}
|
12
14
|
class Javonet
|
13
|
-
begin
|
14
|
-
Transmitter.activate("")
|
15
|
-
rescue Exception => e
|
16
|
-
SdkExceptionHelper.send_exception_to_app_insights(e, "Javonet")
|
17
|
-
raise e
|
18
|
-
end
|
19
15
|
|
16
|
+
SdkExceptionHelper.send_exception_to_app_insights("SdkMessage", "Javonet SDK initialized")
|
20
17
|
|
21
18
|
# Initializes Javonet using an in-memory channel on the same machine.
|
22
19
|
# @return [RuntimeFactory] A RuntimeFactory instance configured for an in-memory connection.
|
@@ -39,7 +36,6 @@ class Javonet
|
|
39
36
|
# @see Refer to this {https://www.javonet.com/guides/v2/ruby/foundations/configure-channel article on Javonet Guides}
|
40
37
|
def self.with_config(path)
|
41
38
|
begin
|
42
|
-
Transmitter.set_config_source(path)
|
43
39
|
ConfigRuntimeFactory.new(path)
|
44
40
|
rescue Exception => e
|
45
41
|
SdkExceptionHelper.send_exception_to_app_insights(e, "withConfig")
|
@@ -50,15 +46,9 @@ class Javonet
|
|
50
46
|
|
51
47
|
# Activates Javonet with the provided license key and optionally with proxy data.
|
52
48
|
# @param license_key [String] The license key to activate Javonet.
|
53
|
-
# @param proxy_host [String] The host for the proxy server (optional).
|
54
|
-
# @param proxy_user_name [String] The username for the proxy server (optional).
|
55
|
-
# @param proxy_user_password [String] The password for the proxy server (optional).
|
56
49
|
# @return [Integer] The activation status code.
|
57
50
|
# @see https://www.javonet.com/guides/v2/ruby/getting-started/activating-javonet Activating Javonet Guide
|
58
51
|
def self.activate(license_key)
|
59
|
-
proxy_host ||= ""
|
60
|
-
proxy_user_name ||= ""
|
61
|
-
proxy_password ||= ""
|
62
52
|
begin
|
63
53
|
return Transmitter.activate(license_key)
|
64
54
|
rescue Exception => e
|
@@ -67,4 +57,8 @@ class Javonet
|
|
67
57
|
end
|
68
58
|
end
|
69
59
|
|
60
|
+
def get_runtime_info(get_loaded_modules)
|
61
|
+
RuntimeLogger.get_runtime_info(get_loaded_modules)
|
62
|
+
end
|
63
|
+
|
70
64
|
end
|