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.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/javonet-ruby-sdk/Binaries/Clr/Javonet.Clr.Utils.dll +0 -0
  4. data/lib/javonet-ruby-sdk/Binaries/Clr/JavonetClrRuntime.dll +0 -0
  5. data/lib/javonet-ruby-sdk/Binaries/Jvm/JavonetJvmRuntime.jar +0 -0
  6. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs2218RuntimeNative.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  15. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetActivationService.dylib +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libJavonetJvmRuntimeNative.dylib +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/libUtils.dylib +0 -0
  18. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/ARM64/version.txt +1 -1
  19. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs2218RuntimeNative.dylib +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  23. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Configs.dll +0 -0
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPhpRuntimeNative.dll +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Configs.dll +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  44. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs2218RuntimeNative.dll +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhp848RuntimeNative.dll +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPhpRuntimeNative.dll +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPython2RuntimeNative.dll +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  56. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Configs.dll +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  59. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPhpRuntimeNative.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPython2RuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  70. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Plugins.dll +0 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/Handler.cjs +51 -18
  74. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeInstanceMethodHandler.cjs +1 -1
  75. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/InvokeStaticMethodHandler.cjs +1 -1
  76. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/LoadLibraryHandler.cjs +15 -9
  77. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/PassDelegateHandler.cjs +2 -2
  78. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/RegisterForUpdateHandler.cjs +60 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/handler/ValueForUpdateHandler.cjs +36 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/interpreter/Interpreter.cjs +11 -33
  81. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/protocol/CommandSerializer.cjs +3 -8
  82. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/core/receiver/Receiver.cjs +6 -6
  83. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Activator.cjs +44 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ActivatorDetails.cjs +13 -3
  85. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/ConfigRuntimeFactory.cjs +9 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/InvocationContext.cjs +140 -62
  87. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/Javonet.cjs +3 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/RuntimeContext.cjs +9 -9
  89. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/configuration/ConfigSourceResolver.cjs +43 -21
  90. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/sdk/tools/ComplexTypeResolver.cjs +84 -34
  91. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/Handler.d.ts +9 -1
  92. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/PassDelegateHandler.d.ts +2 -2
  93. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/RegisterForUpdateHandler.d.ts +17 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/handler/ValueForUpdateHandler.d.ts +7 -0
  95. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/interpreter/Interpreter.d.ts +2 -2
  96. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/protocol/CommandSerializer.d.ts +3 -3
  97. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/core/receiver/Receiver.d.ts +4 -4
  98. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Activator.d.ts +12 -0
  99. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ActivatorDetails.d.ts +5 -3
  100. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/ConfigRuntimeFactory.d.ts +7 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/InvocationContext.d.ts +20 -22
  102. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/Javonet.d.ts +2 -1
  103. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/RuntimeContext.d.ts +4 -3
  104. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/configuration/ConfigSourceResolver.d.ts +21 -4
  105. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/sdk/tools/ComplexTypeResolver.d.ts +21 -5
  106. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/CommandType.d.ts +2 -0
  107. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/types/utils/Primitives.d.ts +5 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/CommandType.cjs +3 -1
  109. data/lib/javonet-ruby-sdk/Binaries/Nodejs/dist/utils/Primitives.cjs +201 -0
  110. 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
  111. 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
  112. 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
  113. 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
  114. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  115. 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
  116. 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
  117. 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
  118. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  119. 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
  120. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +86 -86
  121. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  122. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
  123. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
  124. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
  125. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  126. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  127. 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
  128. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  129. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +24 -24
  131. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/LoadLibraryHandler.pm +108 -11
  132. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/CommandHandler/RegisterForUpdateHandler.pm +29 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Handler/PerlHandler.pm +16 -9
  134. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Sdk/Core/PerlCommandType.pm +2 -1
  135. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/handler/LoadLibraryHandler.php +56 -21
  136. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/interpreter/Interpreter.php +2 -2
  137. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandDeserializer.php +219 -106
  138. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/core/protocol/CommandSerializer.php +55 -13
  139. data/lib/javonet-ruby-sdk/Binaries/Php/javonet/utils/Command.php +27 -9
  140. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  141. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/DelegatesCache.cpython-312.pyc +0 -0
  142. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/delegateCache/__pycache__/__init__.cpython-312.pyc +0 -0
  143. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AsOutHandler.py +1 -1
  144. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +0 -2
  145. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +2 -2
  146. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/Handler.py +26 -1
  147. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/LoadLibraryHandler.py +54 -14
  148. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/RegisterForUpdateHandler.py +38 -0
  149. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/ValueForUpdateHandler.py +6 -0
  150. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AddEventListenerHandler.cpython-312.pyc +0 -0
  153. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  154. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayReferenceHandler.cpython-312.pyc +0 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  159. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsOutHandler.cpython-312.pyc +0 -0
  160. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AsRefHandler.cpython-312.pyc +0 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ConvertTypeHandler.cpython-312.pyc +0 -0
  163. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateNullHandler.cpython-312.pyc +0 -0
  165. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  167. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ExceptionHandler.cpython-312.pyc +0 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GenerateLibHandler.cpython-312.pyc +0 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetAsyncOperationResultHandler.cpython-312.pyc +0 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.cpython-312.pyc +0 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetGlobalFieldHandler.cpython-312.pyc +0 -0
  175. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceFieldHandler.cpython-312.pyc +0 -0
  176. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetInstanceMethodAsDelegateHandler.cpython-312.pyc +0 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetKwargHandler.cpython-312.pyc +0 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetModuleHandler.cpython-312.pyc +0 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetRefValueHandler.cpython-312.pyc +0 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetResultTypeHandler.cpython-312.pyc +0 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetStaticMethodAsDelegateHandler.cpython-312.pyc +0 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HeartBeatHandler.cpython-312.pyc +0 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeDelegateHandler.cpython-312.pyc +0 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericMethodHandler.cpython-312.pyc +0 -0
  189. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGenericStaticMethodHandler.cpython-312.pyc +0 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeGlobalFunctionHandler.cpython-312.pyc +0 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  194. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/OptimizeHandler.cpython-312.pyc +0 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PassDelegateHandler.cpython-312.pyc +0 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/PluginWrapperHandler.cpython-312.pyc +0 -0
  197. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RegisterForUpdateHandler.cpython-312.pyc +0 -0
  198. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  199. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/RetrieveArrayHandler.cpython-312.pyc +0 -0
  200. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueForUpdateHandler.cpython-312.pyc +0 -0
  203. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  204. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  205. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  206. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  208. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  209. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  210. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  211. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  212. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  213. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  214. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  215. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  217. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  219. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  220. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/CommandType.py +3 -1
  221. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/LazyModuleLoader.py +8 -11
  222. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  223. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  224. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  225. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  226. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/LazyModuleLoader.cpython-312.pyc +0 -0
  227. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeLogger.cpython-312.pyc +0 -0
  228. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  229. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  230. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  231. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/TypesHandler.cpython-312.pyc +0 -0
  232. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/UtilsConst.cpython-312.pyc +0 -0
  233. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  234. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  235. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  236. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  237. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/ExceptionSerializer.py +1 -1
  238. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  239. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionThrower.cpython-312.pyc +0 -0
  240. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/JavonetException.cpython-312.pyc +0 -0
  241. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  242. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/MessageHelper.cpython-312.pyc +0 -0
  243. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/messageHelper/__pycache__/__init__.cpython-312.pyc +0 -0
  244. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  245. data/lib/javonet-ruby-sdk/core/handler/handler.rb +50 -9
  246. data/lib/javonet-ruby-sdk/core/handler/load_library_handler.rb +22 -9
  247. data/lib/javonet-ruby-sdk/core/handler/register_for_update_handler.rb +28 -0
  248. data/lib/javonet-ruby-sdk/core/handler/value_for_update_handler.rb +11 -0
  249. data/lib/javonet-ruby-sdk/sdk/config_runtime_factory.rb +8 -0
  250. data/lib/javonet-ruby-sdk/utils/command_type.rb +6 -0
  251. data/lib/javonet-ruby-sdk/utils/exceptions/exception_serializer.rb +0 -1
  252. 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
- private const DEFAULT_SERIALIZER_CONNECTION_DATA = [0, 0, 0, 0, 0, 0, 0];
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('Error during serialization ' . $e);
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 (null !== $connectionData) {
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
- array_push($buffer, ...TypeSerializer::serializeCommand($payloadItem));
91
+ // Nested command
92
+ self::insertIntoBuffer($buffer, TypeSerializer::serializeCommand($payloadItem));
56
93
  self::serializeRecursively($payloadItem, $buffer);
57
- } else if (TypesHandler::isSimpleType($payloadItem)) {
58
- array_push($buffer, ...TypeSerializer::serializePrimitive($payloadItem));
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
- $command->getRuntimeName(),
102
+ new RuntimeName(RuntimeName::PHP),
62
103
  CommandType::REFERENCE(),
63
- ReferencesCache::getInstance()->cacheReference($payloadItem)
104
+ $referenceId
64
105
  );
65
- array_push($buffer, ...TypeSerializer::serializeCommand($refCommand));
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
- ...$payload
20
+ ...$payload
20
21
  ) {
21
22
  $this->runtimeName = $runtimeName;
22
23
  $this->commandType = $commandType;
23
- $this->payload = count($payload) === 1 && is_array($payload[0])
24
- ? $payload[0]
25
- : $payload;
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($this->runtimeName, $this->commandType, array_merge($this->payload, [$arg]));
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($this->runtimeName, $this->commandType, [$currentCommand, ...$this->payload]);
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
- elseif ($payloadItem !== $elementPayloadItem) {
176
+ if ($payloadItem !== $elementPayloadItem) {
159
177
  return false;
160
178
  }
161
179
  }
@@ -1,4 +1,4 @@
1
- from javonet.core.handler.AbstractCommandHandler import AbstractCommandHandler
1
+ from javonet.core.handler.AbstractCommandHandler import *
2
2
 
3
3
  class AsOutHandler(AbstractCommandHandler):
4
4
  def process(self, command):
@@ -1,5 +1,3 @@
1
- from inspect import signature
2
-
3
1
  from javonet.core.handler.AbstractCommandHandler import *
4
2
 
5
3
 
@@ -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 to install python packages in one of this directories:\n" + sys_path + "\n\nAvailable user types:\n" + available_types + "\n\n"
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.loaded_directories:
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
- return self.__parse_response(response, command.runtime_name)
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
- loaded_directories = []
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
- if os.path.isdir(command.payload[0]):
21
- sys.path.append(command.payload[0])
22
- LoadLibraryHandler.loaded_directories.append(command.payload[0])
23
- elif os.path.isfile(command.payload[0]) and command.payload[0].endswith(".py"):
24
- # Use LazyModuleLoader for proper lazy loading
25
- module_name = os.path.splitext(os.path.basename(command.payload[0]))[0]
26
- LazyModuleLoader.register_module_path(module_name, command.payload[0])
27
- LoadLibraryHandler.loaded_directories.append(os.path.dirname(command.payload[0]))
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(command.payload[0] + " is not a valid directory or .py file")
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
- exc_type, exc_value = type(e), e
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
- return LoadLibraryHandler.loaded_directories
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.")
@@ -49,4 +49,6 @@ class CommandType(Enum):
49
49
  GetAsyncOperationResult = 44
50
50
  AsKwargs = 45
51
51
  GetResultType = 46
52
- GetGlobalField = 47
52
+ GetGlobalField = 47
53
+ RegisterForUpdate = 48
54
+ ValueForUpdate = 49