javonet-ruby-sdk 2.5.0 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (240) 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/dynamicCompilationHeaders/Linux/jni.h +1960 -0
  7. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Linux/jni_md.h +51 -0
  8. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/MacOs/jni.h +1960 -0
  9. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/MacOs/jni_md.h +51 -0
  10. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Windows/jni.h +1960 -0
  11. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/dynamicCompilationHeaders/Windows/jni_md.h +37 -0
  12. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetActivationService.so +0 -0
  13. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetCppRuntimeNative.so +0 -0
  14. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetGoRuntimeNative.so +0 -0
  15. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetJvmRuntimeNative.so +0 -0
  16. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetNetcoreRuntimeNative.so +0 -0
  17. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetPythonRuntimeNative.so +0 -0
  18. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRuby278RuntimeNative.so +0 -0
  19. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetRubyRuntimeNative.so +0 -0
  20. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpClient.so +0 -0
  21. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libJavonetTcpTlsClient.so +0 -0
  22. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/libUtils.so +0 -0
  23. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/ARM64/version.txt +1 -1
  24. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/NativeUtilsUnitTests.xml +18 -18
  25. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetActivationService.so +0 -0
  26. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetCppRuntimeNative.so +0 -0
  27. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetGoRuntimeNative.so +0 -0
  28. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetJvmRuntimeNative.so +0 -0
  29. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNetcoreRuntimeNative.so +0 -0
  30. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejs1816RuntimeNative.so +0 -0
  31. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetNodejsRuntimeNative.so +0 -0
  32. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPerlRuntimeNative.so +0 -0
  33. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetPythonRuntimeNative.so +0 -0
  34. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRuby278RuntimeNative.so +0 -0
  35. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetRubyRuntimeNative.so +0 -0
  36. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpClient.so +0 -0
  37. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libJavonetTcpTlsClient.so +0 -0
  38. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libUtils.so +0 -0
  39. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/libnethost.so +0 -0
  40. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetActivationService.so +0 -0
  41. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libJavonetTcpTlsClient.so +0 -0
  42. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/openssl3/libUtils.so +0 -0
  43. data/lib/javonet-ruby-sdk/Binaries/Native/Linux/X64/version.txt +1 -1
  44. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetActivationService.dylib +0 -0
  45. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetCppRuntimeNative.dylib +0 -0
  46. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetGoRuntimeNative.dylib +0 -0
  47. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetJvmRuntimeNative.dylib +0 -0
  48. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNetcoreRuntimeNative.dylib +0 -0
  49. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejs1816RuntimeNative.dylib +0 -0
  50. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetNodejsRuntimeNative.dylib +0 -0
  51. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPerlRuntimeNative.dylib +0 -0
  52. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetPythonRuntimeNative.dylib +0 -0
  53. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRuby278RuntimeNative.dylib +0 -0
  54. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetRubyRuntimeNative.dylib +0 -0
  55. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpClient.dylib +0 -0
  56. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libJavonetTcpTlsClient.dylib +0 -0
  57. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libUtils.dylib +0 -0
  58. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/libnethost.dylib +0 -0
  59. data/lib/javonet-ruby-sdk/Binaries/Native/MacOs/X64/version.txt +1 -1
  60. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetActivationService.dll +0 -0
  61. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetCppRuntimeNative.dll +0 -0
  62. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetGoRuntimeNative.dll +0 -0
  63. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetJvmRuntimeNative.dll +0 -0
  64. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetNetcoreRuntimeNative.dll +0 -0
  65. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetPythonRuntimeNative.dll +0 -0
  66. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRuby278RuntimeNative.dll +0 -0
  67. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetRubyRuntimeNative.dll +0 -0
  68. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpClient.dll +0 -0
  69. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/JavonetTcpTlsClient.dll +0 -0
  70. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion31LatestPatch.runtimeconfig.json +10 -0
  71. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion60LatestPatch.runtimeconfig.json +10 -0
  72. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion70LatestPatch.runtimeconfig.json +10 -0
  73. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersion80LatestPatch.runtimeconfig.json +10 -0
  74. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/NetVersionLatest.runtimeconfig.json +10 -0
  75. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/Utils.dll +0 -0
  76. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Linux/jni.h +1960 -0
  77. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Linux/jni_md.h +51 -0
  78. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/MacOs/jni.h +1960 -0
  79. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/MacOs/jni_md.h +51 -0
  80. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Windows/jni.h +1960 -0
  81. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/dynamicCompilationHeaders/Windows/jni_md.h +37 -0
  82. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libcrypto-3-arm64.dll +0 -0
  83. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libssl-3-arm64.dll +0 -0
  84. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxml2.dll +0 -0
  85. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxmlsec-openssl.dll +0 -0
  86. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxmlsec.dll +0 -0
  87. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/libxslt.dll +0 -0
  88. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/nethost.dll +0 -0
  89. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/python312.dll +0 -0
  90. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/ARM64/version.txt +0 -0
  91. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetActivationService.dll +0 -0
  92. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetClrRuntimeNative.dll +0 -0
  93. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetCppRuntimeNative.dll +0 -0
  94. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetGoRuntimeNative.dll +0 -0
  95. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetJvmRuntimeNative.dll +0 -0
  96. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNetcoreRuntimeNative.dll +0 -0
  97. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejs1816RuntimeNative.dll +0 -0
  98. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetNodejsRuntimeNative.dll +0 -0
  99. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPerlRuntimeNative.dll +0 -0
  100. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetPythonRuntimeNative.dll +0 -0
  101. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRuby278RuntimeNative.dll +0 -0
  102. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetRubyRuntimeNative.dll +0 -0
  103. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpClient.dll +0 -0
  104. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/JavonetTcpTlsClient.dll +0 -0
  105. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/Utils.dll +0 -0
  106. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X64/version.txt +1 -1
  107. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetActivationService.dll +0 -0
  108. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetClrRuntimeNative.dll +0 -0
  109. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetCppRuntimeNative.dll +0 -0
  110. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetGoRuntimeNative.dll +0 -0
  111. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetJvmRuntimeNative.dll +0 -0
  112. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetNetcoreRuntimeNative.dll +0 -0
  113. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetPythonRuntimeNative.dll +0 -0
  114. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpClient.dll +0 -0
  115. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/JavonetTcpTlsClient.dll +0 -0
  116. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/Utils.dll +0 -0
  117. data/lib/javonet-ruby-sdk/Binaries/Native/Windows/X86/version.txt +1 -1
  118. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Core.dll +0 -0
  119. data/lib/javonet-ruby-sdk/Binaries/Netcore/Javonet.Netcore.Utils.dll +0 -0
  120. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/interpreter/Interpreter.js +43 -24
  121. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/protocol/CommandSerializer.js +7 -31
  122. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/receiver/Receiver.js +6 -1
  123. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/transmitter/Transmitter.js +2 -14
  124. data/lib/javonet-ruby-sdk/Binaries/Nodejs/core/webSocketClient/WebSocketClient.js +133 -0
  125. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/ConnectionType.js +2 -1
  126. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/IConnectionData.js +17 -0
  127. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/InMemoryConnectionData.js +28 -0
  128. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/{TcpConnectionData.js → connectionData/TcpConnectionData.js} +26 -6
  129. data/lib/javonet-ruby-sdk/Binaries/Nodejs/utils/connectionData/WsConnectionData.js +33 -0
  130. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/List/Util/XS.pm +1 -1
  131. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/List/Util.pm +1 -1
  132. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/List/Utils.pm +43 -0
  133. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Scalar/Util.pm +1 -1
  134. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/Sub/Util.pm +1 -1
  135. 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
  136. 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
  137. 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
  138. 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
  139. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Moose/Moose.so +0 -0
  140. 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
  141. 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
  142. 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
  143. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/auto/Want/Want.so +0 -0
  144. 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
  145. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/deps/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod +89 -89
  146. data/lib/javonet-ruby-sdk/Binaries/Perl/Linux/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +12 -1
  147. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Data/UUID/UUID.xs.dll +0 -0
  148. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/PPI/XS/XS.xs.dll +0 -0
  149. 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
  150. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/Want/Want.xs.dll +0 -0
  151. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/auto/autobox/autobox.xs.dll +0 -0
  152. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/deps/lib/perl5/MSWin32-x64-multi-thread/perllocal.pod +19 -19
  153. data/lib/javonet-ruby-sdk/Binaries/Perl/Windows/X64/lib/Javonet/Core/Transmitter/PerlTransmitterWrapper.pm +12 -1
  154. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/__pycache__/__init__.cpython-312.pyc +0 -0
  155. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/__pycache__/__init__.cpython-312.pyc +0 -0
  156. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/PythonStringBuilder.cpython-312.pyc +0 -0
  157. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/generator/internal/__pycache__/__init__.cpython-312.pyc +0 -0
  158. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/CreateClassInstanceHandler.py +1 -7
  159. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/GetTypeHandler.py +4 -3
  160. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractCommandHandler.cpython-312.pyc +0 -0
  161. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/AbstractHandler.cpython-312.pyc +0 -0
  162. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetItemHandler.cpython-312.pyc +0 -0
  163. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetRankHandler.cpython-312.pyc +0 -0
  164. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayGetSizeHandler.cpython-312.pyc +0 -0
  165. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArrayHandler.cpython-312.pyc +0 -0
  166. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ArraySetItemHandler.cpython-312.pyc +0 -0
  167. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CastingHandler.cpython-312.pyc +0 -0
  168. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/CreateClassInstanceHandler.cpython-312.pyc +0 -0
  169. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/DestructReferenceHandler.cpython-312.pyc +0 -0
  170. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableNamespaceHandler.cpython-312.pyc +0 -0
  171. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/EnableTypeHandler.cpython-312.pyc +0 -0
  172. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumItemHandler.cpython-312.pyc +0 -0
  173. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumNameHandler.cpython-312.pyc +0 -0
  174. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetEnumValueHandler.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__/GetStaticFieldHandler.cpython-312.pyc +0 -0
  177. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/GetTypeHandler.cpython-312.pyc +0 -0
  178. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/Handler.cpython-312.pyc +0 -0
  179. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/HandlerDictionary.cpython-312.pyc +0 -0
  180. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeInstanceMethodHandler.cpython-312.pyc +0 -0
  181. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/InvokeStaticMethodHandler.cpython-312.pyc +0 -0
  182. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/LoadLibraryHandler.cpython-312.pyc +0 -0
  183. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ResolveInstanceHandler.cpython-312.pyc +0 -0
  184. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetInstanceFieldHandler.cpython-312.pyc +0 -0
  185. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/SetStaticFieldHandler.cpython-312.pyc +0 -0
  186. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/ValueHandler.cpython-312.pyc +0 -0
  187. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/__pycache__/__init__.cpython-312.pyc +0 -0
  188. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/Interpreter.py +13 -17
  189. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/Interpreter.cpython-312.pyc +0 -0
  190. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/interpreter/__pycache__/__init__.cpython-312.pyc +0 -0
  191. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/NamespaceCache.cpython-312.pyc +0 -0
  192. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/namespaceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  193. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/CommandDeserializer.py +9 -9
  194. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandDeserializer.cpython-312.pyc +0 -0
  195. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/CommandSerializer.cpython-312.pyc +0 -0
  196. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeDeserializer.cpython-312.pyc +0 -0
  197. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/TypeSerializer.cpython-312.pyc +0 -0
  198. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/protocol/__pycache__/__init__.cpython-312.pyc +0 -0
  199. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/Receiver.py +6 -6
  200. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/Receiver.cpython-312.pyc +0 -0
  201. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/receiver/__pycache__/__init__.cpython-312.pyc +0 -0
  202. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/ReferencesCache.cpython-312.pyc +0 -0
  203. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/referenceCache/__pycache__/__init__.cpython-312.pyc +0 -0
  204. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/transmitter/TransmitterWrapper.py +7 -1
  205. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/TypeCache.cpython-312.pyc +0 -0
  206. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/typeCache/__pycache__/__init__.cpython-312.pyc +0 -0
  207. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/core/webSocketClient/WebSocketClient.py +0 -1
  208. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Command.cpython-312.pyc +0 -0
  209. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/CommandType.cpython-312.pyc +0 -0
  210. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ConnectionType.cpython-312.pyc +0 -0
  211. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/ExceptionType.cpython-312.pyc +0 -0
  212. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/RuntimeName.cpython-312.pyc +0 -0
  213. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/StringEncodingMode.cpython-312.pyc +0 -0
  214. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/Type.cpython-312.pyc +0 -0
  215. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  216. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/IConnectionData.cpython-312.pyc +0 -0
  217. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/InMemoryConnectionData.cpython-312.pyc +0 -0
  218. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/connectionData/__pycache__/__init__.cpython-312.pyc +0 -0
  219. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/ExceptionSerializer.cpython-312.pyc +0 -0
  220. data/lib/javonet-ruby-sdk/Binaries/Python/javonet/utils/exception/__pycache__/__init__.cpython-312.pyc +0 -0
  221. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/interpreter/interpreter.rb +6 -10
  222. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/protocol/command_deserializer.rb +2 -2
  223. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter.rb +4 -16
  224. data/lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter_wrapper.rb +12 -1
  225. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/interpreter/interpreter.rb +6 -10
  226. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/protocol/command_deserializer.rb +2 -2
  227. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter.rb +4 -16
  228. data/lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter_wrapper.rb +12 -1
  229. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/interpreter/interpreter.rb +6 -10
  230. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/protocol/command_deserializer.rb +2 -2
  231. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter.rb +4 -16
  232. data/lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter_wrapper.rb +12 -1
  233. data/lib/javonet-ruby-sdk/Binaries/version.txt +1 -1
  234. data/lib/javonet-ruby-sdk/core/interpreter/interpreter.rb +6 -10
  235. data/lib/javonet-ruby-sdk/core/protocol/command_deserializer.rb +2 -2
  236. data/lib/javonet-ruby-sdk/core/transmitter/transmitter.rb +4 -16
  237. data/lib/javonet-ruby-sdk/core/transmitter/transmitter_wrapper.rb +12 -1
  238. data/lib/javonet-ruby-sdk/sdk/invocation_context.rb +6 -0
  239. data/lib/javonet-ruby-sdk/sdk/javonet.rb +3 -3
  240. metadata +48 -3
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved.
3
+ * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4
+ *
5
+ *
6
+ *
7
+ *
8
+ *
9
+ *
10
+ *
11
+ *
12
+ *
13
+ *
14
+ *
15
+ *
16
+ *
17
+ *
18
+ *
19
+ *
20
+ *
21
+ *
22
+ *
23
+ *
24
+ */
25
+
26
+ #ifndef _JAVASOFT_JNI_MD_H_
27
+ #define _JAVASOFT_JNI_MD_H_
28
+
29
+ #define JNIEXPORT __declspec(dllexport)
30
+ #define JNIIMPORT __declspec(dllimport)
31
+ #define JNICALL __stdcall
32
+
33
+ typedef long jint;
34
+ typedef __int64 jlong;
35
+ typedef signed char jbyte;
36
+
37
+ #endif /* !_JAVASOFT_JNI_MD_H_ */
@@ -1 +1 @@
1
- '2.5.0'
1
+ '2.5.2'
@@ -1 +1 @@
1
- '2.5.0'
1
+ '2.5.2'
@@ -10,36 +10,55 @@ let Receiver
10
10
  class Interpreter {
11
11
  handler = new Handler()
12
12
 
13
- execute(command, connectionType, tcpAddress) {
14
- let commandSerializer = new CommandSerializer()
15
- let byteMessage = commandSerializer.serialize(command,connectionType, tcpAddress)
16
- let responseByteArray
17
-
18
- if (command.runtimeName === Runtime.Nodejs && connectionType === ConnectionType.IN_MEMORY)
19
- {
20
- // lazy receiver loading
21
- if (!Receiver) {
22
- Receiver = require('../receiver/Receiver')
23
- }
24
- responseByteArray = Receiver.sendCommand(byteMessage)
13
+ async executeAsync(command, connectionData) {
14
+ try {
15
+ const messageByteArray = new CommandSerializer().serialize(command, connectionData)
16
+
17
+ if (connectionData.connectionType === ConnectionType.WEB_SOCKET) {
18
+ const { WebSocketClient } = require("../webSocketClient/WebSocketClient");
19
+ const wsClient = new WebSocketClient(connectionData.hostname, null)
25
20
 
21
+ const responseByteArray = await wsClient.send(messageByteArray)
22
+ return new CommandDeserializer(responseByteArray).deserialize()
23
+ }
24
+ else {
25
+ return this.execute(command, connectionData)
26
+ }
27
+ } catch (error) {
28
+ // TODO: handle error exception log?
26
29
  }
27
- else {
28
- // lazy transmitter loading
29
- if (!Transmitter) {
30
- Transmitter = require('../transmitter/Transmitter')
30
+ }
31
+
32
+ execute(command, connectionData) {
33
+ try {
34
+ let messageByteArray = new CommandSerializer().serialize(command, connectionData)
35
+ let responseByteArray
36
+
37
+ if (command.runtimeName === Runtime.Nodejs && connectionData.connectionType === ConnectionType.IN_MEMORY)
38
+ {
39
+ // lazy receiver loading
40
+ if (!Receiver) {
41
+ Receiver = require('../receiver/Receiver')
42
+ }
43
+ responseByteArray = Receiver.sendCommand(messageByteArray)
44
+
45
+ }
46
+ else {
47
+ // lazy transmitter loading
48
+ if (!Transmitter) {
49
+ Transmitter = require('../transmitter/Transmitter')
50
+ }
51
+ responseByteArray = Transmitter.sendCommand(messageByteArray)
31
52
  }
32
- responseByteArray = Transmitter.sendCommand(byteMessage)
53
+ return new CommandDeserializer(responseByteArray).deserialize()
54
+ } catch (error) {
55
+ // TODO: handle error exception log?
33
56
  }
34
- return new CommandDeserializer(responseByteArray).deserialize()
35
57
  }
36
58
 
37
- process(byteArray) {
38
- let commandDeserializer = new CommandDeserializer(byteArray)
39
- let receivedCommand = commandDeserializer.deserialize()
40
- let responseCommand = this.handler.handleCommand(receivedCommand)
41
- let commandSerializer = new CommandSerializer()
42
- return commandSerializer.serialize(responseCommand, ConnectionType.IN_MEMORY)
59
+ process(messageByteArray) {
60
+ let receivedCommand = new CommandDeserializer(messageByteArray).deserialize()
61
+ return this.handler.handleCommand(receivedCommand)
43
62
  }
44
63
  }
45
64
 
@@ -1,45 +1,21 @@
1
1
  const Command = require("../../utils/Command")
2
2
  const TypeEncoder = require('./TypeSerializer')
3
- const ConnectionType = require("../../utils/ConnectionType");
4
3
  const Runtime = require('../../utils/RuntimeName')
5
4
 
6
5
  class CommandSerializer {
7
6
  buffer = new Int8Array(2)
8
7
 
9
- serialize(command, connectionType, tcpConnectionData = null, runtimeVersion = 0) {
8
+
9
+ serialize(command, connectionData, runtimeVersion = 0) {
10
10
  let deque = [command]
11
11
  this.buffer[0] = command.runtimeName
12
12
  this.buffer[1] = runtimeVersion
13
- this.#insertIntoBuffer(this.#serialize_tcp(connectionType, tcpConnectionData))
13
+ this.#insertIntoBuffer(connectionData.serializeConnectionData())
14
14
  this.#insertIntoBuffer(new Int8Array([Runtime.Nodejs, command.commandType]))
15
- return this.#encodeRecursively(deque)
16
- }
17
-
18
- #serialize_tcp = function(connectionType, tcpConnectionData) {
19
- let encodedTcp = new Int8Array(7)
20
- encodedTcp[0] = connectionType
21
- if (connectionType === ConnectionType.IN_MEMORY || tcpConnectionData === null) {
22
- encodedTcp[1] = 0
23
- encodedTcp[2] = 0
24
- encodedTcp[3] = 0
25
- encodedTcp[4] = 0
26
- encodedTcp[5] = 0
27
- encodedTcp[6] = 0
28
- }
29
- else if (ConnectionType.TCP === connectionType) {
30
- let address = tcpConnectionData.getAddressBytes()
31
- let port = tcpConnectionData.getPortBytes()
32
- encodedTcp[1] = address[0]
33
- encodedTcp[2] = address[1]
34
- encodedTcp[3] = address[2]
35
- encodedTcp[4] = address[3]
36
- encodedTcp[5] = port[0]
37
- encodedTcp[6] = port[1]
38
- }
39
- return encodedTcp
15
+ return this.#serializeRecursively(deque)
40
16
  }
41
17
 
42
- #encodeRecursively = function(deque) {
18
+ #serializeRecursively = function(deque) {
43
19
  if (deque.length === 0) return this.buffer;
44
20
  let cmd = deque.pop()
45
21
  deque.push(cmd.dropFirstPayloadArg())
@@ -52,11 +28,11 @@ class CommandSerializer {
52
28
  let result = TypeEncoder.encodePrimitive(cmd.payload[0])
53
29
  this.#insertIntoBuffer(result)
54
30
  }
55
- return this.#encodeRecursively(deque)
31
+ return this.#serializeRecursively(deque)
56
32
  } else {
57
33
  deque.pop()
58
34
  }
59
- return this.#encodeRecursively(deque)
35
+ return this.#serializeRecursively(deque)
60
36
  }
61
37
 
62
38
  #insertIntoBuffer = function(arg) {
@@ -1,9 +1,14 @@
1
1
  const Interpreter = require('../interpreter/Interpreter')
2
+ const CommandSerializer = require("../protocol/CommandSerializer");
3
+ const InMemoryConnectionData = require("../../utils/connectionData/InMemoryConnectionData");
2
4
  const interpreter = new Interpreter()
3
5
 
4
6
  class Receiver {
7
+
8
+ static connectionData = new InMemoryConnectionData();
9
+
5
10
  static sendCommand(messageByteArray) {
6
- return interpreter.process(messageByteArray)
11
+ return new CommandSerializer().serialize(interpreter.process(messageByteArray), this.connectionData)
7
12
  }
8
13
  static heartBeat(messageByteArray) {
9
14
  let response = new Int8Array(2)
@@ -6,20 +6,8 @@ class Transmitter {
6
6
  return wrapper.sendCommand(messageArray)
7
7
  }
8
8
 
9
- static #activate = function(licenseKey = "", proxyHost = "", proxyUserName="", proxyUserPassword="") {
10
- return wrapper.activate(licenseKey, proxyHost, proxyUserName, proxyUserPassword)
11
- }
12
-
13
- static activateWithLicenseFile() {
14
- return this.#activate()
15
- }
16
-
17
- static activateWithCredentials(licenseKey) {
18
- return this.#activate(licenseKey)
19
- }
20
-
21
- static activateWithCredentialsAndProxy(licenseKey, proxyHost, proxyUserName, proxyUserPassword) {
22
- return this.#activate(licenseKey, proxyHost, proxyUserName, proxyUserPassword)
9
+ static activate = function(licenseKey = "") {
10
+ return wrapper.activate(licenseKey, "", "", "")
23
11
  }
24
12
 
25
13
  static setConfigSource(configSource) {
@@ -0,0 +1,133 @@
1
+ const WebSocket = require('ws');
2
+
3
+ /**
4
+ * Enum for WebSocket states.
5
+ * @readonly
6
+ * @enum {string}
7
+ */
8
+ const WebSocketStateEnum = {
9
+ OPEN: 'open',
10
+ CLOSE: 'close',
11
+ ERROR: 'error',
12
+ };
13
+
14
+ /**
15
+ * WebSocketClient class that handles WebSocket connection, message sending, and automatic disconnection.
16
+ */
17
+ class WebSocketClient {
18
+ /**
19
+ * @param {string} url
20
+ * @param {object} options
21
+ */
22
+ constructor(url, options) {
23
+ /**
24
+ * @type {string}
25
+ */
26
+ this.url = url;
27
+
28
+ /**
29
+ * @type {WebSocket | null}
30
+ */
31
+ this.instance = null;
32
+
33
+ /**
34
+ * @type {boolean} isConnected indicates whether the WebSocket is connected.
35
+ */
36
+ this.isConnected = false;
37
+
38
+ /**
39
+ * @type {boolean}
40
+ */
41
+ this.isDisconnectedAfterMessage = options?.isDisconnectedAfterMessage ?? false;
42
+ }
43
+
44
+ /**
45
+ * Sends data through websocket connection
46
+ * @async
47
+ * @param {Buffer|ArrayBuffer|Buffer[]} data
48
+ * @returns {Promise<Buffer|ArrayBuffer|Buffer[]>}
49
+ */
50
+ send(data) {
51
+ return new Promise((resolve, reject) => {
52
+ try {
53
+ if (this.isConnected) {
54
+ this._sendMessage(data, resolve, reject);
55
+ } else {
56
+ this._connect().then(() => {
57
+ this._sendMessage(data, resolve, reject);
58
+ });
59
+ }
60
+ } catch (error) {
61
+ reject(error);
62
+ }
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Disconnects the WebSocket by terminating the connection.
68
+ */
69
+ disconnect() {
70
+ if (this.instance) {
71
+ this.instance.terminate();
72
+ }
73
+ this.isConnected = false;
74
+ }
75
+
76
+ /**
77
+ * Connects to the WebSocket server.
78
+ * @private
79
+ * @async
80
+ * @returns {Promise<void>} - A promise that resolves when the connection is established.
81
+ */
82
+ _connect() {
83
+ return new Promise((resolve, reject) => {
84
+ this.instance = new WebSocket(this.url);
85
+
86
+ this.instance.on(WebSocketStateEnum.OPEN, () => {
87
+ console.log('[WebSocketClient] connected');
88
+ this.isConnected = true;
89
+ resolve();
90
+ });
91
+
92
+ this.instance.on(WebSocketStateEnum.ERROR, (error) => {
93
+ console.log('[WebSocketClient] error', error);
94
+ reject(error);
95
+ });
96
+
97
+ this.instance.on(WebSocketStateEnum.CLOSE, () => {
98
+ console.log('[WebSocketClient] closed');
99
+ this.isConnected = false;
100
+ });
101
+ });
102
+ }
103
+
104
+ /**
105
+ * Sends the data to the WebSocket server and listens for a response.
106
+ * @private
107
+ * @async
108
+ * @param {string|Buffer|ArrayBuffer|Buffer[]} data - The data to send.
109
+ * @param {Function} resolve - The resolve function for the Promise.
110
+ * @param {Function} reject - The reject function for the Promise.
111
+ */
112
+ _sendMessage(data, resolve, reject) {
113
+ this.instance.send(data, (err) => {
114
+ if (err) {
115
+ reject(err);
116
+ }
117
+ });
118
+
119
+ this.instance.on('message', (message) => {
120
+ resolve(message);
121
+
122
+ if (this.isDisconnectedAfterMessage) {
123
+ this.disconnect();
124
+ }
125
+ });
126
+
127
+ this.instance.on('error', (error) => {
128
+ reject(error);
129
+ });
130
+ }
131
+ }
132
+
133
+ module.exports = { WebSocketClient }
@@ -1,4 +1,5 @@
1
1
  module.exports = {
2
2
  IN_MEMORY: 0,
3
- TCP: 1
3
+ TCP: 1,
4
+ WEB_SOCKET: 2
4
5
  }
@@ -0,0 +1,17 @@
1
+ const ConnectionType = require('../../utils/ConnectionType');
2
+
3
+ class IConnectionData {
4
+ get connectionType() {
5
+ throw new Error('You have to implement the method connectionType!');
6
+ }
7
+
8
+ get hostname() {
9
+ throw new Error('You have to implement the method hostname!');
10
+ }
11
+
12
+ serializeConnectionData() {
13
+ throw new Error('You have to implement the method serializeConnectionData!');
14
+ }
15
+ }
16
+
17
+ module.exports = IConnectionData;
@@ -0,0 +1,28 @@
1
+ const ConnectionType = require('../../utils/ConnectionType');
2
+ const IConnectionData = require('./IConnectionData');
3
+
4
+ class InMemoryConnectionData extends IConnectionData {
5
+ constructor() {
6
+ super();
7
+ this._connectionType = ConnectionType.IN_MEMORY;
8
+ this._hostname = ""
9
+ }
10
+
11
+ get connectionType() {
12
+ return this._connectionType;
13
+ }
14
+
15
+ get hostname() {
16
+ return this._hostname;
17
+ }
18
+
19
+ serializeConnectionData() {
20
+ return [this.connectionType, 0, 0, 0, 0, 0, 0];
21
+ }
22
+
23
+ equals(other) {
24
+ return other instanceof InMemoryConnectionData;
25
+ }
26
+ }
27
+
28
+ module.exports = InMemoryConnectionData;
@@ -1,9 +1,14 @@
1
1
  const dns = require('dns');
2
+ const ConnectionType = require('../../utils/ConnectionType');
3
+ const IConnectionData = require("./IConnectionData");
2
4
 
3
- class TcpConnectionData {
5
+ class TcpConnectionData extends IConnectionData{
4
6
 
5
7
  constructor(hostname, port) {
6
- this.port = port;
8
+ super();
9
+ this._port = port;
10
+ this._hostname = hostname;
11
+ this._connectionType = ConnectionType.TCP;
7
12
  if (hostname === "localhost") {
8
13
  this.ipAddress = "127.0.0.1";
9
14
  } else {
@@ -11,9 +16,17 @@ class TcpConnectionData {
11
16
  }
12
17
  }
13
18
 
19
+ get connectionType() {
20
+ return this._connectionType;
21
+ }
22
+
23
+ get hostname() {
24
+ return this._hostname;
25
+ }
26
+
14
27
  equals(other) {
15
28
  if (other instanceof TcpConnectionData) {
16
- return this.ipAddress === other.ipAddress && this.port === other.port;
29
+ return this.ipAddress === other.ipAddress && this._port === other._port;
17
30
  }
18
31
  return false;
19
32
  }
@@ -36,12 +49,19 @@ class TcpConnectionData {
36
49
  }
37
50
  }
38
51
 
39
- getAddressBytes() {
52
+ serializeConnectionData() {
53
+ let result = [this.connectionType];
54
+ result = result.concat(this.#getAddressBytes());
55
+ result = result.concat(this.#getPortBytes());
56
+ return result;
57
+ }
58
+
59
+ #getAddressBytes() {
40
60
  return this.ipAddress.split('.').map(Number);
41
61
  }
42
62
 
43
- getPortBytes() {
44
- return [this.port & 0xFF, this.port >> 8];
63
+ #getPortBytes() {
64
+ return [this._port & 0xFF, this._port >> 8];
45
65
  }
46
66
 
47
67
  }
@@ -0,0 +1,33 @@
1
+ const ConnectionType = require('../../utils/ConnectionType');
2
+ const IConnectionData = require('./IConnectionData');
3
+
4
+ class WsConnectionData extends IConnectionData {
5
+ constructor(hostname) {
6
+ super();
7
+ this._hostname = hostname;
8
+ this._connectionType = ConnectionType.WEB_SOCKET;
9
+ }
10
+
11
+ get connectionType() {
12
+ return this._connectionType;
13
+ }
14
+
15
+ get hostname() {
16
+ return this._hostname;
17
+ }
18
+
19
+ set hostname(value) {
20
+ this._hostname = value;
21
+ }
22
+
23
+ serializeConnectionData() {
24
+ return [this.connectionType, 0, 0, 0, 0, 0, 0];
25
+ }
26
+
27
+ equals(other) {
28
+ return other instanceof WsConnectionData && this._hostname === other.hostname;
29
+ }
30
+
31
+ }
32
+
33
+ module.exports = WsConnectionData;
@@ -3,7 +3,7 @@ use strict;
3
3
  use warnings;
4
4
  use List::Util;
5
5
 
6
- our $VERSION = "1.66"; # FIXUP
6
+ our $VERSION = "1.68"; # FIXUP
7
7
  $VERSION =~ tr/_//d; # FIXUP
8
8
 
9
9
  1;
@@ -16,7 +16,7 @@ our @EXPORT_OK = qw(
16
16
  sample shuffle uniq uniqint uniqnum uniqstr zip zip_longest zip_shortest mesh mesh_longest mesh_shortest
17
17
  head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
18
18
  );
19
- our $VERSION = "1.66";
19
+ our $VERSION = "1.68";
20
20
  our $XS_VERSION = $VERSION;
21
21
  $VERSION =~ tr/_//d;
22
22