lib/javonet-ruby-sdk.rb in javonet-ruby-sdk-2.1.13 vs lib/javonet-ruby-sdk.rb in javonet-ruby-sdk-2.1.14

- old
+ new

@@ -1,23 +1,42 @@ require_relative './javonet-ruby-sdk/utils/connection_type' require_relative './javonet-ruby-sdk/sdk/internal/runtime_factory' require_relative './javonet-ruby-sdk/core/transmitter/transmitter' +# The Javonet class is a singleton class that serves as the entry point for interacting with Javonet. +# It provides methods to activate and initialize the Javonet SDK. +# It supports both in-memory and TCP connections. +# @see Refer to this {https://www.javonet.com/guides/v2/ruby/foundations/javonet-static-class article on Javonet Guides} class Javonet - Transmitter.activate_with_licence_file() + Transmitter.activate_with_licence_file + # Initializes Javonet using an in-memory channel on the same machine. + # @return [RuntimeFactory] A RuntimeFactory instance configured for an in-memory connection. + # @see Refer to this {https://www.javonet.com/guides/v2/ruby/foundations/in-memory-channel article on Javonet Guides} def self.in_memory connection_type = ConnectionType::IN_MEMORY return RuntimeFactory.new(connection_type) end + # Initializes Javonet with a TCP connection to a remote machine. + # @param address [TcpConnectionData] The address of the remote machine. + # @return [RuntimeFactory] A RuntimeFactory instance configured for a TCP connection. + # @see Refer to this {https://www.javonet.com/guides/v2/ruby/foundations/tcp-channel article on Javonet Guides} def self.tcp(address) connection_type = ConnectionType::TCP return RuntimeFactory.new(connection_type, address) end - def self.activate(licenceKey, proxyHost="", proxyUserName="", proxyPassword="") - return Transmitter.activate_with_credentials_and_proxy(licenceKey, proxyHost, proxyUserName, proxyPassword) + + # Activates Javonet with the provided license key and optionally with proxy data. + # @param licence_key [String] The license key to activate Javonet. + # @param proxy_host [String] The host for the proxy server (optional). + # @param proxy_user_name [String] The username for the proxy server (optional). + # @param proxy_user_password [String] The password for the proxy server (optional). + # @return [Integer] The activation status code. + # @see https://www.javonet.com/guides/v2/ruby/getting-started/activating-javonet Activating Javonet Guide + def self.activate(licence_key, proxy_host="", proxy_user_name="", proxy_password="") + return Transmitter.activate_with_credentials_and_proxy(licence_key, proxy_host, proxy_user_name, proxy_password) end end