javonet-ruby-sdk 2.6.7 → 2.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/libJavonetActivationService.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/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/libJavonetActivationService.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/libJavonetNodejs2218RuntimeNative.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/version.txt +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetActivationService.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetJvmRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/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/libJavonetJvmRuntimeNative.dylib +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs2218RuntimeNative.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/Configs.dll +0 -0
- 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/JavonetPhpRuntimeNative.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/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/Configs.dll +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/JavonetNodejs2218RuntimeNative.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/JavonetPhp848RuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.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/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/Configs.dll +0 -0
- 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/JavonetPhpRuntimeNative.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.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.Plugins.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +51 -18
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeInstanceMethodHandler.cjs +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeStaticMethodHandler.cjs +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/LoadLibraryHandler.cjs +15 -9
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/PassDelegateHandler.cjs +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/RegisterForUpdateHandler.cjs +60 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ValueForUpdateHandler.cjs +36 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/interpreter/Interpreter.cjs +11 -33
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandSerializer.cjs +3 -8
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/Receiver.cjs +6 -6
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Activator.cjs +44 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ActivatorDetails.cjs +13 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ConfigRuntimeFactory.cjs +9 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +140 -62
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Javonet.cjs +3 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +9 -9
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/configuration/ConfigSourceResolver.cjs +43 -21
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/ComplexTypeResolver.cjs +84 -34
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +9 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/PassDelegateHandler.d.ts +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/RegisterForUpdateHandler.d.ts +17 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ValueForUpdateHandler.d.ts +7 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/interpreter/Interpreter.d.ts +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandSerializer.d.ts +3 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/Receiver.d.ts +4 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Activator.d.ts +12 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ActivatorDetails.d.ts +5 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ConfigRuntimeFactory.d.ts +7 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +20 -22
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Javonet.d.ts +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/RuntimeContext.d.ts +4 -3
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/configuration/ConfigSourceResolver.d.ts +21 -4
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/ComplexTypeResolver.d.ts +21 -5
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CommandType.d.ts +2 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Primitives.d.ts +5 -0
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CommandType.cjs +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Primitives.cjs +201 -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 +86 -86
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
- data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
- 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 +24 -24
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
- data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
- data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/handler/LoadLibraryHandler.php +56 -21
- data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/interpreter/Interpreter.php +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandDeserializer.php +219 -106
- data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandSerializer.php +55 -13
- data/lib/javonet-ruby-sdk/Binaries/Php/javonet/utils/Command.php +27 -9
- 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/handler/AsOutHandler.py +1 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +0 -2
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +2 -2
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/Handler.py +26 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/LoadLibraryHandler.py +54 -14
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/RegisterForUpdateHandler.py +38 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/ValueForUpdateHandler.py +6 -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__/AddEventListenerHandler.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__/ArrayReferenceHandler.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__/AsOutHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsRefHandler.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__/ConvertTypeHandler.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__/CreateNullHandler.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__/ExceptionHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GenerateLibHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetAsyncOperationResultHandler.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__/GetGlobalFieldHandler.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__/GetKwargHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetModuleHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetRefValueHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetResultTypeHandler.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__/HeartBeatHandler.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__/InvokeGenericMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericStaticMethodHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.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__/OptimizeHandler.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__/PluginWrapperHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RegisterForUpdateHandler.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__/RetrieveArrayHandler.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__/ValueForUpdateHandler.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/CommandType.py +3 -1
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/LazyModuleLoader.py +8 -11
- 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__/LazyModuleLoader.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__/TypesHandler.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.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/ExceptionSerializer.py +1 -1
- 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__/ExceptionThrower.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/JavonetException.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/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
- data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
- data/lib/javonet-ruby-sdk/core/handler/handler.rb +50 -9
- data/lib/javonet-ruby-sdk/core/handler/load_library_handler.rb +22 -9
- data/lib/javonet-ruby-sdk/core/handler/register_for_update_handler.rb +28 -0
- data/lib/javonet-ruby-sdk/core/handler/value_for_update_handler.rb +11 -0
- data/lib/javonet-ruby-sdk/sdk/config_runtime_factory.rb +8 -0
- data/lib/javonet-ruby-sdk/utils/command_type.rb +6 -0
- data/lib/javonet-ruby-sdk/utils/exceptions/exception_serializer.rb +0 -1
- metadata +18 -2
|
@@ -16,53 +16,95 @@ use utils\TypesHandler;
|
|
|
16
16
|
|
|
17
17
|
final class CommandSerializer
|
|
18
18
|
{
|
|
19
|
+
private const DEFAULT_SERIALIZER_CONNECTION_DATA = [0, 0, 0, 0, 0, 0, 0];
|
|
20
|
+
|
|
19
21
|
private function __construct()
|
|
20
22
|
{
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Serialize command to array of bytes (ints 0–255).
|
|
27
|
+
*
|
|
28
|
+
* @return int[]
|
|
29
|
+
*/
|
|
25
30
|
public static function serialize(CommandInterface $rootCommand, ?IConnectionData $connectionData): array
|
|
26
31
|
{
|
|
27
32
|
try {
|
|
33
|
+
$buffer = [];
|
|
34
|
+
|
|
35
|
+
// Write runtime and version
|
|
28
36
|
$buffer[] = $rootCommand->getRuntimeName()->getValue();
|
|
29
37
|
$buffer[] = 0; // runtimeVersion
|
|
30
|
-
array_push($buffer, ...self::getDataByConnectionData($connectionData));
|
|
31
|
-
$buffer[] = RuntimeName::PHP;
|
|
32
|
-
$buffer[] = $rootCommand->getCommandType()->getValue();
|
|
33
38
|
|
|
39
|
+
// Write connection data
|
|
40
|
+
self::insertIntoBuffer($buffer, self::getDataByConnectionData($connectionData));
|
|
41
|
+
|
|
42
|
+
// Write runtime name and command type header for PHP runtime
|
|
43
|
+
self::insertIntoBuffer($buffer, [
|
|
44
|
+
RuntimeName::PHP,
|
|
45
|
+
$rootCommand->getCommandType()->getValue(),
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
// Serialize payload recursively
|
|
34
49
|
self::serializeRecursively($rootCommand, $buffer);
|
|
35
50
|
|
|
36
51
|
return $buffer;
|
|
37
52
|
} catch (Exception $e) {
|
|
38
|
-
throw new RuntimeException(
|
|
53
|
+
throw new RuntimeException(
|
|
54
|
+
'Error during serialization: ' . $e->getMessage(),
|
|
55
|
+
0,
|
|
56
|
+
$e
|
|
57
|
+
);
|
|
39
58
|
}
|
|
40
59
|
}
|
|
41
60
|
|
|
61
|
+
/**
|
|
62
|
+
* @return int[]
|
|
63
|
+
*/
|
|
42
64
|
private static function getDataByConnectionData(?IConnectionData $connectionData): array
|
|
43
65
|
{
|
|
44
|
-
if (
|
|
66
|
+
if ($connectionData !== null) {
|
|
45
67
|
return $connectionData->serializeConnectionData();
|
|
46
68
|
}
|
|
47
69
|
|
|
48
70
|
return self::DEFAULT_SERIALIZER_CONNECTION_DATA;
|
|
49
71
|
}
|
|
50
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @param int[] $buffer
|
|
75
|
+
* @param int[] $data
|
|
76
|
+
*/
|
|
77
|
+
private static function insertIntoBuffer(array &$buffer, array $data): void
|
|
78
|
+
{
|
|
79
|
+
foreach ($data as $value) {
|
|
80
|
+
$buffer[] = $value;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @param int[] $buffer
|
|
86
|
+
*/
|
|
51
87
|
private static function serializeRecursively(CommandInterface $command, array &$buffer): void
|
|
52
88
|
{
|
|
53
89
|
foreach ($command->getPayload() as $payloadItem) {
|
|
54
90
|
if ($payloadItem instanceof CommandInterface) {
|
|
55
|
-
|
|
91
|
+
// Nested command
|
|
92
|
+
self::insertIntoBuffer($buffer, TypeSerializer::serializeCommand($payloadItem));
|
|
56
93
|
self::serializeRecursively($payloadItem, $buffer);
|
|
57
|
-
}
|
|
58
|
-
|
|
94
|
+
} elseif (TypesHandler::isSimpleType($payloadItem)) {
|
|
95
|
+
// Primitive or simple type
|
|
96
|
+
self::insertIntoBuffer($buffer, TypeSerializer::serializePrimitive($payloadItem));
|
|
59
97
|
} else {
|
|
98
|
+
// Complex object – serialize as reference command
|
|
99
|
+
$referenceId = ReferencesCache::getInstance()->cacheReference($payloadItem);
|
|
100
|
+
|
|
60
101
|
$refCommand = new Command(
|
|
61
|
-
|
|
102
|
+
new RuntimeName(RuntimeName::PHP),
|
|
62
103
|
CommandType::REFERENCE(),
|
|
63
|
-
|
|
104
|
+
$referenceId
|
|
64
105
|
);
|
|
65
|
-
|
|
106
|
+
|
|
107
|
+
self::insertIntoBuffer($buffer, TypeSerializer::serializeCommand($refCommand));
|
|
66
108
|
self::serializeRecursively($refCommand, $buffer);
|
|
67
109
|
}
|
|
68
110
|
}
|
|
@@ -11,18 +11,23 @@ final class Command implements CommandInterface
|
|
|
11
11
|
{
|
|
12
12
|
private RuntimeName $runtimeName;
|
|
13
13
|
private CommandType $commandType;
|
|
14
|
+
/** @var array<mixed> */
|
|
14
15
|
private array $payload;
|
|
15
16
|
|
|
16
17
|
public function __construct(
|
|
17
18
|
RuntimeName $runtimeName,
|
|
18
19
|
CommandType $commandType,
|
|
19
|
-
|
|
20
|
+
...$payload
|
|
20
21
|
) {
|
|
21
22
|
$this->runtimeName = $runtimeName;
|
|
22
23
|
$this->commandType = $commandType;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
// If a single array is passed, treat it as the payload itself.
|
|
26
|
+
if (count($payload) === 1 && is_array($payload[0])) {
|
|
27
|
+
$this->payload = $payload[0];
|
|
28
|
+
} else {
|
|
29
|
+
$this->payload = $payload;
|
|
30
|
+
}
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
/**
|
|
@@ -30,7 +35,11 @@ final class Command implements CommandInterface
|
|
|
30
35
|
*/
|
|
31
36
|
public function addArgToPayload($arg): CommandInterface
|
|
32
37
|
{
|
|
33
|
-
return new Command
|
|
38
|
+
// Keep semantics (return new Command) but avoid array_merge overhead.
|
|
39
|
+
$newPayload = $this->payload;
|
|
40
|
+
$newPayload[] = $arg;
|
|
41
|
+
|
|
42
|
+
return new Command($this->runtimeName, $this->commandType, $newPayload);
|
|
34
43
|
}
|
|
35
44
|
|
|
36
45
|
/**
|
|
@@ -51,6 +60,9 @@ final class Command implements CommandInterface
|
|
|
51
60
|
return $this->commandType;
|
|
52
61
|
}
|
|
53
62
|
|
|
63
|
+
/**
|
|
64
|
+
* @return array<mixed>
|
|
65
|
+
*/
|
|
54
66
|
public function getPayload(): array
|
|
55
67
|
{
|
|
56
68
|
return $this->payload;
|
|
@@ -84,14 +96,14 @@ final class Command implements CommandInterface
|
|
|
84
96
|
$result .= ' CommandType: ';
|
|
85
97
|
$result .= $this->commandType->getName();
|
|
86
98
|
$result .= ' Payload: ';
|
|
87
|
-
json_encode($this->payload);
|
|
99
|
+
$result .= json_encode($this->payload);
|
|
88
100
|
|
|
89
101
|
return $result;
|
|
90
102
|
} catch (Exception $e) {
|
|
91
103
|
return 'Error while converting command to string: ' . $e->getMessage();
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
|
-
|
|
106
|
+
|
|
95
107
|
/**
|
|
96
108
|
* @param mixed $response
|
|
97
109
|
*/
|
|
@@ -116,7 +128,11 @@ final class Command implements CommandInterface
|
|
|
116
128
|
return new self($this->runtimeName, $this->commandType, $this->payload);
|
|
117
129
|
}
|
|
118
130
|
|
|
119
|
-
return new self(
|
|
131
|
+
return new self(
|
|
132
|
+
$this->runtimeName,
|
|
133
|
+
$this->commandType,
|
|
134
|
+
[$currentCommand, ...$this->payload]
|
|
135
|
+
);
|
|
120
136
|
}
|
|
121
137
|
|
|
122
138
|
/**
|
|
@@ -147,15 +163,17 @@ final class Command implements CommandInterface
|
|
|
147
163
|
if (!$payloadItem->equals($elementPayloadItem)) {
|
|
148
164
|
return false;
|
|
149
165
|
}
|
|
166
|
+
continue;
|
|
150
167
|
}
|
|
151
168
|
|
|
152
169
|
if (is_object($payloadItem) && method_exists($payloadItem, 'equals') && is_object($elementPayloadItem)) {
|
|
153
170
|
if (!$payloadItem->equals($elementPayloadItem)) {
|
|
154
171
|
return false;
|
|
155
172
|
}
|
|
173
|
+
continue;
|
|
156
174
|
}
|
|
157
175
|
|
|
158
|
-
|
|
176
|
+
if ($payloadItem !== $elementPayloadItem) {
|
|
159
177
|
return false;
|
|
160
178
|
}
|
|
161
179
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -47,7 +47,7 @@ class GetTypeHandler(AbstractCommandHandler):
|
|
|
47
47
|
exc_type, exc_value = type(e), e
|
|
48
48
|
sys_path = "\n".join(sys.path)
|
|
49
49
|
available_types = "\n".join(self.get_all_available_types())
|
|
50
|
-
new_message = str(e) + "\nMake sure
|
|
50
|
+
new_message = str(e) + "\nMake sure that your python solution is in one of this directories:\n" + sys_path + "\n\nAvailable user types:\n" + available_types + "\n\n"
|
|
51
51
|
new_exc = exc_type(new_message).with_traceback(e.__traceback__)
|
|
52
52
|
raise new_exc from None
|
|
53
53
|
|
|
@@ -75,7 +75,7 @@ class GetTypeHandler(AbstractCommandHandler):
|
|
|
75
75
|
def get_all_available_types(self):
|
|
76
76
|
"""Get all available types without loading/executing any modules."""
|
|
77
77
|
available_types = set()
|
|
78
|
-
for directory in LoadLibraryHandler.
|
|
78
|
+
for directory in LoadLibraryHandler.loaded_dir_and_files:
|
|
79
79
|
for root, _, files in os.walk(directory):
|
|
80
80
|
if "Binaries" in root:
|
|
81
81
|
continue
|
|
@@ -47,6 +47,8 @@ from javonet.core.handler.GetAsyncOperationResultHandler import GetAsyncOperatio
|
|
|
47
47
|
from javonet.core.handler.GetKwargHandler import GetKwargHandler
|
|
48
48
|
from javonet.core.handler.GetResultTypeHandler import GetResultTypeHandler
|
|
49
49
|
from javonet.core.handler.GetGlobalFieldHandler import GetGlobalFieldHandler
|
|
50
|
+
from javonet.core.handler.RegisterForUpdateHandler import RegisterForUpdateHandler
|
|
51
|
+
from javonet.core.handler.ValueForUpdateHandler import ValueForUpdateHandler
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
from javonet.core.handler.HandlerDictionary import handler_dict
|
|
@@ -108,6 +110,8 @@ class Handler(AbstractHandler):
|
|
|
108
110
|
handler_dict[CommandType.AsKwargs] = GetKwargHandler()
|
|
109
111
|
handler_dict[CommandType.GetResultType] = GetResultTypeHandler()
|
|
110
112
|
handler_dict[CommandType.GetGlobalField] = GetGlobalFieldHandler()
|
|
113
|
+
handler_dict[CommandType.RegisterForUpdate] = RegisterForUpdateHandler()
|
|
114
|
+
handler_dict[CommandType.ValueForUpdate] = ValueForUpdateHandler()
|
|
111
115
|
|
|
112
116
|
def handle_command(self, command):
|
|
113
117
|
try:
|
|
@@ -115,8 +119,29 @@ class Handler(AbstractHandler):
|
|
|
115
119
|
response_array = handler_dict[CommandType.Reference].handle_command(command.payload[0])
|
|
116
120
|
return Command.create_array_response(response_array, command.runtime_name)
|
|
117
121
|
|
|
122
|
+
# Preprocess PluginWrapper before routing to specific handler
|
|
123
|
+
if command.command_type == CommandType.PluginWrapper:
|
|
124
|
+
command = PluginWrapperHandler().handle_command(command)
|
|
125
|
+
|
|
118
126
|
response = handler_dict.get(command.command_type).handle_command(command)
|
|
119
|
-
|
|
127
|
+
parsed = self.__parse_response(response, command.runtime_name)
|
|
128
|
+
|
|
129
|
+
# Append ValueForUpdate commands from RegisterForUpdateHandler contexts
|
|
130
|
+
contexts = RegisterForUpdateHandler._invocation_contexts.map
|
|
131
|
+
if contexts and len(contexts) > 0:
|
|
132
|
+
for guid, instance in list(contexts.items()):
|
|
133
|
+
instance_guid = ReferencesCache().cache_reference(instance)
|
|
134
|
+
update_cmd = Command(
|
|
135
|
+
command.runtime_name,
|
|
136
|
+
CommandType.ValueForUpdate,
|
|
137
|
+
[str(guid) if guid is not None else "",
|
|
138
|
+
instance_guid]
|
|
139
|
+
)
|
|
140
|
+
parsed = parsed.add_arg_to_payload(update_cmd)
|
|
141
|
+
# Clear all entries after processing this request
|
|
142
|
+
contexts.clear()
|
|
143
|
+
|
|
144
|
+
return parsed
|
|
120
145
|
except Exception as e:
|
|
121
146
|
return ExceptionSerializer.serialize_exception(e, command)
|
|
122
147
|
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import importlib.util
|
|
2
1
|
import os
|
|
3
2
|
import sys
|
|
3
|
+
import py_compile
|
|
4
|
+
from argparse import ArgumentError
|
|
4
5
|
|
|
5
6
|
from javonet.core.handler.AbstractCommandHandler import *
|
|
6
7
|
from javonet.utils.LazyModuleLoader import LazyModuleLoader
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class LoadLibraryHandler(AbstractCommandHandler):
|
|
10
|
-
|
|
11
|
+
# Track loaded directories/files by absolute path
|
|
12
|
+
loaded_dir_and_files = set()
|
|
11
13
|
|
|
12
14
|
def __init__(self):
|
|
13
15
|
self._required_parameters_count = 1
|
|
@@ -17,23 +19,61 @@ class LoadLibraryHandler(AbstractCommandHandler):
|
|
|
17
19
|
if len(command.payload) != self._required_parameters_count:
|
|
18
20
|
raise Exception("LoadLibrary payload parameters mismatch")
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
dir_or_file_to_load = command.payload[0]
|
|
23
|
+
|
|
24
|
+
if not isinstance(dir_or_file_to_load, str) or not dir_or_file_to_load:
|
|
25
|
+
raise Exception("Library path is required and must be a non-empty string")
|
|
26
|
+
|
|
27
|
+
# ------------------------------------------------------------------
|
|
28
|
+
# Normalize file extension:
|
|
29
|
+
# - If no extension is provided and "<path>.py" exists, use that.
|
|
30
|
+
# ------------------------------------------------------------------
|
|
31
|
+
normalized_path = dir_or_file_to_load
|
|
32
|
+
root, ext = os.path.splitext(normalized_path)
|
|
33
|
+
if ext == "":
|
|
34
|
+
candidate = normalized_path + ".py"
|
|
35
|
+
if os.path.isfile(candidate):
|
|
36
|
+
normalized_path = candidate
|
|
37
|
+
|
|
38
|
+
# Use absolute path for de-duplication
|
|
39
|
+
absolute_path = os.path.abspath(normalized_path)
|
|
40
|
+
|
|
41
|
+
# Ensure path exists
|
|
42
|
+
if not os.path.exists(absolute_path):
|
|
43
|
+
raise Exception(f"{dir_or_file_to_load} does not exist")
|
|
44
|
+
|
|
45
|
+
# ------------------------------------------------------------------
|
|
46
|
+
# Load only once (by absolute path)
|
|
47
|
+
# ------------------------------------------------------------------
|
|
48
|
+
if absolute_path in LoadLibraryHandler.loaded_dir_and_files:
|
|
49
|
+
return 0
|
|
50
|
+
|
|
51
|
+
if os.path.isdir(absolute_path):
|
|
52
|
+
# Add directory to sys.path only if not already present
|
|
53
|
+
if absolute_path not in sys.path:
|
|
54
|
+
sys.path.append(absolute_path)
|
|
55
|
+
|
|
56
|
+
elif os.path.isfile(absolute_path) and absolute_path.endswith(".py"):
|
|
57
|
+
# ------------------------------------------------------------------
|
|
58
|
+
# Validate Python syntax before registering module
|
|
59
|
+
# ------------------------------------------------------------------
|
|
60
|
+
py_compile.compile(absolute_path, doraise=True)
|
|
61
|
+
|
|
62
|
+
module_name = os.path.splitext(os.path.basename(absolute_path))[0]
|
|
63
|
+
LazyModuleLoader.register_module_path(module_name, absolute_path)
|
|
28
64
|
else:
|
|
29
|
-
raise Exception(
|
|
65
|
+
raise Exception(f"{dir_or_file_to_load} is not a valid directory or .py file")
|
|
66
|
+
|
|
67
|
+
# Mark as loaded
|
|
68
|
+
LoadLibraryHandler.loaded_dir_and_files.add(absolute_path)
|
|
30
69
|
|
|
31
70
|
return 0
|
|
71
|
+
|
|
32
72
|
except Exception as e:
|
|
33
|
-
|
|
34
|
-
new_exc = exc_type(exc_value).with_traceback(e.__traceback__)
|
|
73
|
+
new_exc = ArgumentError(None, str(e)).with_traceback(e.__traceback__)
|
|
35
74
|
raise new_exc from None
|
|
36
75
|
|
|
37
76
|
@staticmethod
|
|
38
77
|
def get_loaded_directories():
|
|
39
|
-
|
|
78
|
+
# Return a list for external callers
|
|
79
|
+
return list(LoadLibraryHandler.loaded_dir_and_files)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import threading
|
|
2
|
+
from uuid import UUID
|
|
3
|
+
from javonet.core.handler.AbstractCommandHandler import *
|
|
4
|
+
|
|
5
|
+
class _ThreadContexts(threading.local):
|
|
6
|
+
def __init__(self):
|
|
7
|
+
# guid (UUID or empty GUID) -> object
|
|
8
|
+
self.map = {}
|
|
9
|
+
|
|
10
|
+
class RegisterForUpdateHandler(AbstractCommandHandler):
|
|
11
|
+
# Shared per process, separate dicts per thread
|
|
12
|
+
_invocation_contexts = _ThreadContexts()
|
|
13
|
+
_required_parameters_count = 2
|
|
14
|
+
|
|
15
|
+
@classmethod
|
|
16
|
+
def _get_or_create_context_dict(cls):
|
|
17
|
+
if getattr(cls._invocation_contexts, "map", None) is None:
|
|
18
|
+
cls._invocation_contexts.map = {}
|
|
19
|
+
return cls._invocation_contexts.map
|
|
20
|
+
|
|
21
|
+
def process(self, command):
|
|
22
|
+
# Validate minimal number of parameters
|
|
23
|
+
if command.payload is None or len(command.payload) < self._required_parameters_count:
|
|
24
|
+
raise ValueError(f"{self.__class__.__name__} requires at least {self._required_parameters_count} parameter(s).")
|
|
25
|
+
|
|
26
|
+
obj_to_register = command.payload[0]
|
|
27
|
+
guid_to_register = None
|
|
28
|
+
if len(command.payload) > 1 and command.payload[1]:
|
|
29
|
+
try:
|
|
30
|
+
guid_to_register = UUID(str(command.payload[1]))
|
|
31
|
+
except Exception:
|
|
32
|
+
# If invalid GUID, treat as no GUID
|
|
33
|
+
guid_to_register = None
|
|
34
|
+
|
|
35
|
+
ctx = self._get_or_create_context_dict()
|
|
36
|
+
# Use None as key when GUID is missing (analogous to Guid.Empty)
|
|
37
|
+
ctx[guid_to_register] = obj_to_register
|
|
38
|
+
return obj_to_register
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
from javonet.core.handler.AbstractCommandHandler import *
|
|
2
|
+
|
|
3
|
+
class ValueForUpdateHandler(AbstractCommandHandler):
|
|
4
|
+
def process(self, command):
|
|
5
|
+
# Special-cased in Handler.handle_command; placeholder only.
|
|
6
|
+
raise NotImplementedError(f"{self.__class__.__name__} is not implemented in Python.")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary file
|
data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc
CHANGED
|
Binary file
|
data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|