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
|
@@ -27,29 +27,38 @@ final class LoadLibraryHandler extends AbstractHandler
|
|
|
27
27
|
{
|
|
28
28
|
if ($command->getPayloadSize() < self::REQUIRED_ARGUMENTS_COUNT) {
|
|
29
29
|
throw new JavonetArgumentsMismatchException(
|
|
30
|
-
|
|
30
|
+
self::class,
|
|
31
31
|
self::REQUIRED_ARGUMENTS_COUNT
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
$assemblyName = (string) $command->getPayload()[0];
|
|
36
|
+
|
|
36
37
|
if (!file_exists($assemblyName)) {
|
|
37
38
|
throw new Exception('File not found: ' . $assemblyName);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
// Normalize path first
|
|
42
|
+
$canonicalPath = realpath($assemblyName);
|
|
43
|
+
if ($canonicalPath === false) {
|
|
44
|
+
throw new Exception('Cannot resolve path: ' . $assemblyName);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Already loaded? bail out early
|
|
48
|
+
if (in_array($canonicalPath, self::$loadedLibraries, true)) {
|
|
41
49
|
return 0;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
// Use canonical path for type detection as well
|
|
53
|
+
if (is_dir($canonicalPath)) {
|
|
54
|
+
$this->loadDirectory($canonicalPath);
|
|
55
|
+
} elseif (pathinfo($canonicalPath, PATHINFO_EXTENSION) === 'phar') {
|
|
56
|
+
$this->loadPharFile($canonicalPath);
|
|
48
57
|
} else {
|
|
49
|
-
$this->loadPhpFile($
|
|
58
|
+
$this->loadPhpFile($canonicalPath);
|
|
50
59
|
}
|
|
51
60
|
|
|
52
|
-
self::$loadedLibraries[] = $
|
|
61
|
+
self::$loadedLibraries[] = $canonicalPath;
|
|
53
62
|
return 0;
|
|
54
63
|
}
|
|
55
64
|
|
|
@@ -79,51 +88,69 @@ final class LoadLibraryHandler extends AbstractHandler
|
|
|
79
88
|
throw new Exception('PHAR file is not readable: ' . $pharPath);
|
|
80
89
|
}
|
|
81
90
|
|
|
91
|
+
$realPath = realpath($pharPath);
|
|
92
|
+
if ($realPath === false) {
|
|
93
|
+
throw new Exception('Cannot resolve PHAR path: ' . $pharPath);
|
|
94
|
+
}
|
|
95
|
+
|
|
82
96
|
try {
|
|
83
|
-
$phar = new Phar($
|
|
97
|
+
$phar = new Phar($realPath);
|
|
84
98
|
|
|
85
99
|
$currentIncludePath = get_include_path();
|
|
86
|
-
if (strpos($currentIncludePath, $
|
|
87
|
-
set_include_path($currentIncludePath . PATH_SEPARATOR . $
|
|
88
|
-
$this->loadedClassPaths[] = $
|
|
100
|
+
if (strpos($currentIncludePath, $realPath) === false) {
|
|
101
|
+
set_include_path($currentIncludePath . PATH_SEPARATOR . $realPath);
|
|
102
|
+
$this->loadedClassPaths[] = $realPath;
|
|
89
103
|
}
|
|
90
104
|
|
|
91
105
|
if (isset($phar['bootstrap.php'])) {
|
|
92
|
-
include_once 'phar://' . $
|
|
106
|
+
include_once 'phar://' . $realPath . '/bootstrap.php';
|
|
93
107
|
}
|
|
94
108
|
} catch (Exception $e) {
|
|
95
109
|
throw new Exception(sprintf('Error loading PHAR file %s : %s', $pharPath, $e->getMessage()));
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
|
|
113
|
+
private static array $loadedPhpFiles = []; // optional extra safeguard
|
|
114
|
+
|
|
99
115
|
private function loadPhpFile(string $filePath): void
|
|
100
116
|
{
|
|
101
117
|
if (!is_readable($filePath)) {
|
|
102
118
|
throw new Exception('PHP file is not readable: ' . $filePath);
|
|
103
119
|
}
|
|
104
120
|
|
|
105
|
-
$
|
|
121
|
+
$realPath = realpath($filePath);
|
|
122
|
+
if ($realPath === false) {
|
|
123
|
+
throw new Exception('Cannot resolve PHP file path: ' . $filePath);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
$fileExtension = pathinfo($realPath, PATHINFO_EXTENSION);
|
|
106
127
|
if (!in_array($fileExtension, ['php', 'inc'], true)) {
|
|
107
|
-
throw new Exception('File is not a valid PHP file: ' . $
|
|
128
|
+
throw new Exception('File is not a valid PHP file: ' . $realPath);
|
|
108
129
|
}
|
|
109
130
|
|
|
110
|
-
|
|
131
|
+
// OPTIONAL: skip if we already loaded this exact file
|
|
132
|
+
if (in_array($realPath, self::$loadedPhpFiles, true)) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
$code = file_get_contents($realPath);
|
|
111
137
|
if ($code === false) {
|
|
112
|
-
throw new Exception(sprintf('Failed to read php file: %s', $
|
|
138
|
+
throw new Exception(sprintf('Failed to read php file: %s', $realPath));
|
|
113
139
|
}
|
|
114
140
|
|
|
115
141
|
try {
|
|
116
142
|
token_get_all($code, TOKEN_PARSE);
|
|
117
143
|
} catch (ParseError $e) {
|
|
118
|
-
throw new Exception(sprintf('PHP syntax error in file %s: %s', $
|
|
144
|
+
throw new Exception(sprintf('PHP syntax error in file %s: %s', $realPath, $e->getMessage()));
|
|
119
145
|
}
|
|
120
146
|
|
|
121
147
|
$lastError = error_get_last();
|
|
122
148
|
if ($lastError && $lastError['type'] === E_PARSE) {
|
|
123
|
-
throw new Exception(sprintf('PHP syntax error in file %s: %s', $
|
|
149
|
+
throw new Exception(sprintf('PHP syntax error in file %s: %s', $realPath, $lastError['message']));
|
|
124
150
|
}
|
|
125
151
|
|
|
126
|
-
include_once $
|
|
152
|
+
include_once $realPath;
|
|
153
|
+
self::$loadedPhpFiles[] = $realPath;
|
|
127
154
|
}
|
|
128
155
|
|
|
129
156
|
private function autoloadPhpFilesFromDirectory(string $directory): void
|
|
@@ -134,7 +161,15 @@ final class LoadLibraryHandler extends AbstractHandler
|
|
|
134
161
|
|
|
135
162
|
foreach ($iterator as $file) {
|
|
136
163
|
if ($file->isFile() && $file->getExtension() === 'php') {
|
|
137
|
-
|
|
164
|
+
$realPath = $file->getRealPath() ?: $file->getPathname();
|
|
165
|
+
|
|
166
|
+
// Optional: same guard as loadPhpFile
|
|
167
|
+
if (in_array($realPath, self::$loadedPhpFiles, true)) {
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
include_once $realPath;
|
|
172
|
+
self::$loadedPhpFiles[] = $realPath;
|
|
138
173
|
}
|
|
139
174
|
}
|
|
140
175
|
}
|
|
@@ -44,7 +44,7 @@ final class Interpreter
|
|
|
44
44
|
return $responseByteArray;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
$response =
|
|
47
|
+
$response = CommandDeserializer::deserialize($responseByteArray);
|
|
48
48
|
if ($this->debugMode === 'TRUE') {
|
|
49
49
|
echo 'Received command: ' . $response;
|
|
50
50
|
MessageHelper::getInstance()->sendMessageToAppInsights('ReceivedCommand', $response->toString());
|
|
@@ -89,7 +89,7 @@ final class Interpreter
|
|
|
89
89
|
|
|
90
90
|
public function process(array $byteArray): CommandInterface
|
|
91
91
|
{
|
|
92
|
-
$receivedCommand =
|
|
92
|
+
$receivedCommand = CommandDeserializer::deserialize($byteArray);
|
|
93
93
|
if ($this->debugMode === 'TRUE') {
|
|
94
94
|
echo 'Received command: ' . $receivedCommand;
|
|
95
95
|
MessageHelper::getInstance()->sendMessageToAppInsights('ReceivedCommand', $receivedCommand->toString());
|
|
@@ -14,81 +14,90 @@ use utils\type\JType;
|
|
|
14
14
|
|
|
15
15
|
final class CommandDeserializer
|
|
16
16
|
{
|
|
17
|
-
private
|
|
18
|
-
private Command $command;
|
|
19
|
-
private array $buffer;
|
|
20
|
-
|
|
21
|
-
public function __construct(
|
|
22
|
-
array $buffer
|
|
23
|
-
) {
|
|
24
|
-
$this->command = new Command(
|
|
25
|
-
new RuntimeName($buffer[0]),
|
|
26
|
-
new CommandType($buffer[10])
|
|
27
|
-
);
|
|
28
|
-
$this->buffer = $buffer;
|
|
29
|
-
$this->position = 11;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private function isNotEnd(): bool
|
|
17
|
+
private function __construct()
|
|
33
18
|
{
|
|
34
|
-
return $this->position < count($this->buffer);
|
|
35
19
|
}
|
|
36
20
|
|
|
37
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @param int[] $buffer
|
|
23
|
+
*/
|
|
24
|
+
public static function deserialize(array $buffer): CommandInterface
|
|
38
25
|
{
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
$position = 11;
|
|
27
|
+
$bufferLength = count($buffer);
|
|
28
|
+
|
|
29
|
+
$runtimeName = new RuntimeName($buffer[0]);
|
|
30
|
+
$commandType = new CommandType($buffer[10]);
|
|
31
|
+
$payload = [];
|
|
32
|
+
|
|
33
|
+
while ($position < $bufferLength) {
|
|
34
|
+
$payload[] = self::readObject($buffer, $position);
|
|
41
35
|
}
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
// Single Command instance created once with full payload
|
|
38
|
+
return new Command($runtimeName, $commandType, $payload);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @param int[] $buffer
|
|
43
|
+
* @return mixed
|
|
44
|
+
*/
|
|
45
|
+
private static function readObject(array $buffer, int &$position)
|
|
47
46
|
{
|
|
48
|
-
$typeByte = new JType($
|
|
47
|
+
$typeByte = new JType($buffer[$position]);
|
|
49
48
|
|
|
50
49
|
switch ($typeByte->getValue()) {
|
|
51
50
|
case JType::JAVONET_COMMAND:
|
|
52
|
-
return
|
|
51
|
+
return self::readCommand($buffer, $position);
|
|
53
52
|
case JType::JAVONET_STRING:
|
|
54
|
-
return
|
|
53
|
+
return self::readString($buffer, $position);
|
|
55
54
|
case JType::JAVONET_INTEGER:
|
|
56
|
-
return
|
|
55
|
+
return self::readInt($buffer, $position);
|
|
57
56
|
case JType::JAVONET_BOOLEAN:
|
|
58
|
-
return
|
|
57
|
+
return self::readBool($buffer, $position);
|
|
59
58
|
case JType::JAVONET_FLOAT:
|
|
60
|
-
return
|
|
59
|
+
return self::readFloat($buffer, $position);
|
|
61
60
|
case JType::JAVONET_BYTE:
|
|
62
|
-
return
|
|
61
|
+
return self::readByte($buffer, $position);
|
|
63
62
|
case JType::JAVONET_CHAR:
|
|
64
|
-
return
|
|
63
|
+
return self::readChar($buffer, $position);
|
|
65
64
|
case JType::JAVONET_LONG:
|
|
66
|
-
return
|
|
65
|
+
return self::readLong($buffer, $position);
|
|
67
66
|
case JType::JAVONET_DOUBLE:
|
|
68
|
-
return
|
|
67
|
+
return self::readDouble($buffer, $position);
|
|
69
68
|
case JType::JAVONET_UNSIGNED_LONG_LONG:
|
|
70
|
-
return
|
|
69
|
+
return self::readUnsignedLong($buffer, $position);
|
|
71
70
|
case JType::JAVONET_UNSIGNED_INTEGER:
|
|
72
|
-
return
|
|
71
|
+
return self::readUnsignedInteger($buffer, $position);
|
|
73
72
|
case JType::JAVONET_NULL:
|
|
74
|
-
return
|
|
73
|
+
return self::readNull($buffer, $position);
|
|
75
74
|
default:
|
|
76
|
-
throw new TypeByteNotSupportedException($
|
|
75
|
+
throw new TypeByteNotSupportedException($buffer[$position]);
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
/**
|
|
80
|
+
* @param int[] $buffer
|
|
81
|
+
*/
|
|
82
|
+
protected static function readCommand(array $buffer, int &$position): CommandInterface
|
|
81
83
|
{
|
|
82
|
-
$p = $
|
|
83
|
-
|
|
84
|
-
$
|
|
85
|
-
|
|
84
|
+
$p = $position;
|
|
85
|
+
|
|
86
|
+
$numberOfElementsInPayload = TypeDeserializer::deserializeInt([
|
|
87
|
+
$buffer[$p + 1],
|
|
88
|
+
$buffer[$p + 2],
|
|
89
|
+
$buffer[$p + 3],
|
|
90
|
+
$buffer[$p + 4],
|
|
91
|
+
]);
|
|
92
|
+
|
|
93
|
+
$runtime = $buffer[$p + 5];
|
|
94
|
+
$commandType = $buffer[$p + 6];
|
|
86
95
|
|
|
87
|
-
$
|
|
96
|
+
$position += 7;
|
|
88
97
|
|
|
89
98
|
$payload = [];
|
|
90
99
|
for ($i = 0; $i < $numberOfElementsInPayload; $i++) {
|
|
91
|
-
$payload[$i] =
|
|
100
|
+
$payload[$i] = self::readObject($buffer, $position);
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
return new Command(
|
|
@@ -98,114 +107,218 @@ final class CommandDeserializer
|
|
|
98
107
|
);
|
|
99
108
|
}
|
|
100
109
|
|
|
101
|
-
|
|
110
|
+
/**
|
|
111
|
+
* @param int[] $buffer
|
|
112
|
+
*/
|
|
113
|
+
private static function readString(array $buffer, int &$position): string
|
|
102
114
|
{
|
|
103
|
-
$p = $
|
|
104
|
-
|
|
105
|
-
$
|
|
106
|
-
|
|
107
|
-
$
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
$p = $position;
|
|
116
|
+
|
|
117
|
+
$stringEncodingMode = new StringEncodingMode($buffer[$p + 1]);
|
|
118
|
+
|
|
119
|
+
$size = TypeDeserializer::deserializeInt([
|
|
120
|
+
$buffer[$p + 2],
|
|
121
|
+
$buffer[$p + 3],
|
|
122
|
+
$buffer[$p + 4],
|
|
123
|
+
$buffer[$p + 5],
|
|
124
|
+
]);
|
|
125
|
+
|
|
126
|
+
$position += 6;
|
|
127
|
+
$p = $position;
|
|
128
|
+
$position += $size;
|
|
129
|
+
|
|
130
|
+
// For strings, size can be large, so array_slice is acceptable here.
|
|
131
|
+
$bytes = array_slice($buffer, $p, $size);
|
|
132
|
+
|
|
133
|
+
return TypeDeserializer::deserializeString($stringEncodingMode, $bytes);
|
|
111
134
|
}
|
|
112
135
|
|
|
113
|
-
|
|
136
|
+
/**
|
|
137
|
+
* @param int[] $buffer
|
|
138
|
+
*/
|
|
139
|
+
private static function readInt(array $buffer, int &$position): int
|
|
114
140
|
{
|
|
115
141
|
$size = 4;
|
|
116
|
-
$
|
|
117
|
-
$p = $
|
|
118
|
-
$
|
|
119
|
-
|
|
120
|
-
|
|
142
|
+
$position += 2;
|
|
143
|
+
$p = $position;
|
|
144
|
+
$position += $size;
|
|
145
|
+
|
|
146
|
+
$bytes = [
|
|
147
|
+
$buffer[$p],
|
|
148
|
+
$buffer[$p + 1],
|
|
149
|
+
$buffer[$p + 2],
|
|
150
|
+
$buffer[$p + 3],
|
|
151
|
+
];
|
|
152
|
+
|
|
153
|
+
return TypeDeserializer::deserializeInt($bytes);
|
|
121
154
|
}
|
|
122
155
|
|
|
123
|
-
|
|
156
|
+
/**
|
|
157
|
+
* @param int[] $buffer
|
|
158
|
+
*/
|
|
159
|
+
private static function readBool(array $buffer, int &$position): bool
|
|
124
160
|
{
|
|
125
161
|
$size = 1;
|
|
126
|
-
$
|
|
127
|
-
$p = $
|
|
128
|
-
$
|
|
162
|
+
$position += 2;
|
|
163
|
+
$p = $position;
|
|
164
|
+
$position += $size;
|
|
165
|
+
|
|
166
|
+
// Keep passing array to match existing TypeDeserializer signature
|
|
167
|
+
$bytes = [$buffer[$p]];
|
|
129
168
|
|
|
130
|
-
return TypeDeserializer::deserializeBool(
|
|
169
|
+
return TypeDeserializer::deserializeBool($bytes);
|
|
131
170
|
}
|
|
132
171
|
|
|
133
|
-
|
|
172
|
+
/**
|
|
173
|
+
* @param int[] $buffer
|
|
174
|
+
*/
|
|
175
|
+
private static function readFloat(array $buffer, int &$position): float
|
|
134
176
|
{
|
|
135
177
|
$size = 4;
|
|
136
|
-
$
|
|
137
|
-
$p = $
|
|
138
|
-
$
|
|
139
|
-
|
|
140
|
-
|
|
178
|
+
$position += 2;
|
|
179
|
+
$p = $position;
|
|
180
|
+
$position += $size;
|
|
181
|
+
|
|
182
|
+
$bytes = [
|
|
183
|
+
$buffer[$p],
|
|
184
|
+
$buffer[$p + 1],
|
|
185
|
+
$buffer[$p + 2],
|
|
186
|
+
$buffer[$p + 3],
|
|
187
|
+
];
|
|
188
|
+
|
|
189
|
+
return TypeDeserializer::deserializeFloat($bytes);
|
|
141
190
|
}
|
|
142
191
|
|
|
143
|
-
|
|
192
|
+
/**
|
|
193
|
+
* @param int[] $buffer
|
|
194
|
+
*/
|
|
195
|
+
private static function readByte(array $buffer, int &$position): int
|
|
144
196
|
{
|
|
145
197
|
$size = 1;
|
|
146
|
-
$
|
|
147
|
-
$p = $
|
|
148
|
-
$
|
|
198
|
+
$position += 2;
|
|
199
|
+
$p = $position;
|
|
200
|
+
$position += $size;
|
|
149
201
|
|
|
150
|
-
return TypeDeserializer::deserializeByte($
|
|
202
|
+
return TypeDeserializer::deserializeByte($buffer[$p]);
|
|
151
203
|
}
|
|
152
204
|
|
|
153
|
-
|
|
205
|
+
/**
|
|
206
|
+
* @param int[] $buffer
|
|
207
|
+
*/
|
|
208
|
+
private static function readChar(array $buffer, int &$position): string
|
|
154
209
|
{
|
|
155
210
|
$size = 1;
|
|
156
|
-
$
|
|
157
|
-
$p = $
|
|
158
|
-
$
|
|
211
|
+
$position += 2;
|
|
212
|
+
$p = $position;
|
|
213
|
+
$position += $size;
|
|
159
214
|
|
|
160
|
-
return TypeDeserializer::deserializeChar($
|
|
215
|
+
return TypeDeserializer::deserializeChar($buffer[$p]);
|
|
161
216
|
}
|
|
162
217
|
|
|
163
|
-
|
|
218
|
+
/**
|
|
219
|
+
* @param int[] $buffer
|
|
220
|
+
*/
|
|
221
|
+
private static function readLong(array $buffer, int &$position): int
|
|
164
222
|
{
|
|
165
223
|
$size = 8;
|
|
166
|
-
$
|
|
167
|
-
$p = $
|
|
168
|
-
$
|
|
169
|
-
|
|
170
|
-
|
|
224
|
+
$position += 2;
|
|
225
|
+
$p = $position;
|
|
226
|
+
$position += $size;
|
|
227
|
+
|
|
228
|
+
$bytes = [
|
|
229
|
+
$buffer[$p],
|
|
230
|
+
$buffer[$p + 1],
|
|
231
|
+
$buffer[$p + 2],
|
|
232
|
+
$buffer[$p + 3],
|
|
233
|
+
$buffer[$p + 4],
|
|
234
|
+
$buffer[$p + 5],
|
|
235
|
+
$buffer[$p + 6],
|
|
236
|
+
$buffer[$p + 7],
|
|
237
|
+
];
|
|
238
|
+
|
|
239
|
+
return TypeDeserializer::deserializeLong($bytes);
|
|
171
240
|
}
|
|
172
241
|
|
|
173
|
-
|
|
242
|
+
/**
|
|
243
|
+
* @param int[] $buffer
|
|
244
|
+
*/
|
|
245
|
+
private static function readDouble(array $buffer, int &$position): float
|
|
174
246
|
{
|
|
175
247
|
$size = 8;
|
|
176
|
-
$
|
|
177
|
-
$p = $
|
|
178
|
-
$
|
|
179
|
-
|
|
180
|
-
|
|
248
|
+
$position += 2;
|
|
249
|
+
$p = $position;
|
|
250
|
+
$position += $size;
|
|
251
|
+
|
|
252
|
+
$bytes = [
|
|
253
|
+
$buffer[$p],
|
|
254
|
+
$buffer[$p + 1],
|
|
255
|
+
$buffer[$p + 2],
|
|
256
|
+
$buffer[$p + 3],
|
|
257
|
+
$buffer[$p + 4],
|
|
258
|
+
$buffer[$p + 5],
|
|
259
|
+
$buffer[$p + 6],
|
|
260
|
+
$buffer[$p + 7],
|
|
261
|
+
];
|
|
262
|
+
|
|
263
|
+
return TypeDeserializer::deserializeDouble($bytes);
|
|
181
264
|
}
|
|
182
265
|
|
|
183
|
-
|
|
266
|
+
/**
|
|
267
|
+
* @param int[] $buffer
|
|
268
|
+
*/
|
|
269
|
+
private static function readUnsignedLong(array $buffer, int &$position): int
|
|
184
270
|
{
|
|
185
271
|
$size = 8;
|
|
186
|
-
$
|
|
187
|
-
$p = $
|
|
188
|
-
$
|
|
189
|
-
|
|
190
|
-
|
|
272
|
+
$position += 2;
|
|
273
|
+
$p = $position;
|
|
274
|
+
$position += $size;
|
|
275
|
+
|
|
276
|
+
$bytes = [
|
|
277
|
+
$buffer[$p],
|
|
278
|
+
$buffer[$p + 1],
|
|
279
|
+
$buffer[$p + 2],
|
|
280
|
+
$buffer[$p + 3],
|
|
281
|
+
$buffer[$p + 4],
|
|
282
|
+
$buffer[$p + 5],
|
|
283
|
+
$buffer[$p + 6],
|
|
284
|
+
$buffer[$p + 7],
|
|
285
|
+
];
|
|
286
|
+
|
|
287
|
+
return TypeDeserializer::deserializeLong($bytes);
|
|
191
288
|
}
|
|
192
289
|
|
|
193
|
-
|
|
290
|
+
/**
|
|
291
|
+
* @param int[] $buffer
|
|
292
|
+
*/
|
|
293
|
+
private static function readUnsignedInteger(array $buffer, int &$position): int
|
|
194
294
|
{
|
|
195
295
|
$size = 4;
|
|
196
|
-
$
|
|
197
|
-
$p = $
|
|
198
|
-
$
|
|
199
|
-
|
|
200
|
-
|
|
296
|
+
$position += 2;
|
|
297
|
+
$p = $position;
|
|
298
|
+
$position += $size;
|
|
299
|
+
|
|
300
|
+
$bytes = [
|
|
301
|
+
$buffer[$p],
|
|
302
|
+
$buffer[$p + 1],
|
|
303
|
+
$buffer[$p + 2],
|
|
304
|
+
$buffer[$p + 3],
|
|
305
|
+
];
|
|
306
|
+
|
|
307
|
+
return TypeDeserializer::deserializeInt($bytes);
|
|
201
308
|
}
|
|
202
309
|
|
|
203
|
-
|
|
310
|
+
/**
|
|
311
|
+
* @param int[] $buffer
|
|
312
|
+
* @return mixed
|
|
313
|
+
*/
|
|
314
|
+
private static function readNull(array $buffer, int &$position)
|
|
204
315
|
{
|
|
205
316
|
$size = 1;
|
|
206
|
-
$
|
|
207
|
-
$
|
|
317
|
+
$position += 2;
|
|
318
|
+
$position += $size;
|
|
208
319
|
|
|
320
|
+
// Current TypeDeserializer::deserializeNull() in your PHP version
|
|
321
|
+
// takes no args; keep that behavior.
|
|
209
322
|
return TypeDeserializer::deserializeNull();
|
|
210
323
|
}
|
|
211
324
|
}
|