Class: Javonet
- Inherits:
-
Object
- Object
- Javonet
- Defined in:
- lib/javonet-ruby-sdk/sdk/javonet.rb
Overview
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.
Class Method Summary collapse
-
.activate(license_key, proxy_host = nil, proxy_user_name = nil, proxy_password = nil) ⇒ Integer
Activates Javonet with the provided license key and optionally with proxy data.
-
.in_memory ⇒ RuntimeFactory
Initializes Javonet using an in-memory channel on the same machine.
-
.tcp(tcp_connection_data) ⇒ RuntimeFactory
Initializes Javonet with a TCP connection to a remote machine.
-
.with_config(path) ⇒ ConfigRuntimeFactory
Initializes Javonet with a custom configuration file.
Class Method Details
.activate(license_key, proxy_host = nil, proxy_user_name = nil, proxy_password = nil) ⇒ Integer
Activates Javonet with the provided license key and optionally with proxy data.
46 47 48 49 50 51 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 46 def self.activate(license_key, proxy_host=nil, proxy_user_name=nil, proxy_password=nil) proxy_host ||= "" proxy_user_name ||= "" proxy_password ||= "" return Transmitter.activate_with_credentials_and_proxy(license_key, proxy_host, proxy_user_name, proxy_password) end |
.in_memory ⇒ RuntimeFactory
Initializes Javonet using an in-memory channel on the same machine.
18 19 20 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 18 def self.in_memory RuntimeFactory.new(ConnectionType::IN_MEMORY, nil) end |
.tcp(tcp_connection_data) ⇒ RuntimeFactory
Initializes Javonet with a TCP connection to a remote machine.
26 27 28 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 26 def self.tcp(tcp_connection_data) RuntimeFactory.new(ConnectionType::TCP, tcp_connection_data) end |
.with_config(path) ⇒ ConfigRuntimeFactory
Initializes Javonet with a custom configuration file.
34 35 36 37 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 34 def self.with_config(path) Transmitter.set_config_source(path) ConfigRuntimeFactory.new(path) end |