Class: RuntimeFactory
- Inherits:
-
AbstractRuntimeFactory
- Object
- AbstractRuntimeFactory
- RuntimeFactory
- Defined in:
- lib/javonet-ruby-sdk/sdk/runtime_factory.rb
Overview
The RuntimeFactory class implements the AbstractRuntimeFactory interface and provides methods for creating runtime contexts. Each method corresponds to a specific runtime (CLR, JVM, .NET Core, Perl, Ruby, Node.js, Python) and returns a RuntimeContext instance for that runtime. # @see Refer to this article on Javonet Guides
Instance Method Summary collapse
-
#clr ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with CLR runtime.
-
#initialize(connection_type, tcp_connection_data) ⇒ RuntimeFactory
constructor
A new instance of RuntimeFactory.
-
#jvm ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with JVM runtime.
-
#netcore ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with .NET runtime.
-
#nodejs ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Node.js runtime.
-
#perl ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Perl runtime.
-
#python ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Python runtime.
-
#ruby ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Ruby runtime.
Constructor Details
#initialize(connection_type, tcp_connection_data) ⇒ RuntimeFactory
Returns a new instance of RuntimeFactory.
11 12 13 14 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 11 def initialize(connection_type, tcp_connection_data) @connection_type = connection_type @tcp_connection_data = tcp_connection_data end |
Instance Method Details
#clr ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with CLR runtime.
19 20 21 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 19 def clr RuntimeContext.get_instance(RuntimeName::CLR, @connection_type, @tcp_connection_data) end |
#jvm ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with JVM runtime.
26 27 28 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 26 def jvm RuntimeContext.get_instance(RuntimeName::JVM, @connection_type, @tcp_connection_data) end |
#netcore ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with .NET runtime.
33 34 35 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 33 def netcore RuntimeContext.get_instance(RuntimeName::NETCORE, @connection_type, @tcp_connection_data) end |
#nodejs ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Node.js runtime.
54 55 56 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 54 def nodejs RuntimeContext.get_instance(RuntimeName::NODEJS, @connection_type, @tcp_connection_data) end |
#perl ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Perl runtime.
40 41 42 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 40 def perl RuntimeContext.get_instance(RuntimeName::PERL, @connection_type, @tcp_connection_data) end |
#python ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Python runtime.
61 62 63 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 61 def python RuntimeContext.get_instance(RuntimeName::PYTHON, @connection_type, @tcp_connection_data) end |
#ruby ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Ruby runtime.
47 48 49 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 47 def ruby RuntimeContext.get_instance(RuntimeName::RUBY, @connection_type, @tcp_connection_data) end |