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, 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.
-
#php ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Php runtime.
-
#python ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Python runtime.
-
#python27 ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Python2.7 runtime.
-
#ruby ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Ruby runtime.
Constructor Details
#initialize(connection_type, 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, connection_data) @connection_type = connection_type @connection_data = 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(RuntimeNameJavonet::CLR, @connection_type, @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(RuntimeNameJavonet::JVM, @connection_type, @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(RuntimeNameJavonet::NETCORE, @connection_type, @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(RuntimeNameJavonet::NODEJS, @connection_type, @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(RuntimeNameJavonet::PERL, @connection_type, @connection_data) end |
#php ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Php runtime.
68 69 70 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 68 def php RuntimeContext.get_instance(RuntimeNameJavonet::PHP, @connection_type, @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(RuntimeNameJavonet::PYTHON, @connection_type, @connection_data) end |
#python27 ⇒ RuntimeContext
Creates a RuntimeContext instance to interact with Python2.7 runtime.
75 76 77 |
# File 'lib/javonet-ruby-sdk/sdk/runtime_factory.rb', line 75 def python27 RuntimeContext.get_instance(RuntimeNameJavonet::PYTHON27, @connection_type, @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(RuntimeNameJavonet::RUBY, @connection_type, @connection_data) end |