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) ⇒ 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.
Instance Method Summary collapse
Class Method Details
.activate(license_key) ⇒ Integer
Activates Javonet with the provided license key and optionally with proxy data.
51 52 53 54 55 56 57 58 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 51 def self.activate(license_key) begin return Transmitter.activate(license_key) rescue Exception => e SdkExceptionHelper.send_exception_to_app_insights(e, license_key) raise e end end |
.in_memory ⇒ RuntimeFactory
Initializes Javonet using an in-memory channel on the same machine.
21 22 23 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 21 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.
29 30 31 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 29 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.
37 38 39 40 41 42 43 44 45 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 37 def self.with_config(path) begin ConfigRuntimeFactory.new(path) rescue Exception => e SdkExceptionHelper.send_exception_to_app_insights(e, "withConfig") raise e end end |
Instance Method Details
#get_runtime_info(get_loaded_modules) ⇒ Object
60 61 62 |
# File 'lib/javonet-ruby-sdk/sdk/javonet.rb', line 60 def get_runtime_info(get_loaded_modules) RuntimeLogger.get_runtime_info(get_loaded_modules) end |