Class: Gisele::VM::Proxy::Client
- Inherits:
-
Object
- Object
- Gisele::VM::Proxy::Client
- Extended by:
- Forwardable
- Includes:
- Lifecycle, Logging, Robustness
- Defined in:
- lib/gisele/vm/proxy/client.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Attributes included from Lifecycle
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ Client
constructor
A new instance of Client.
- #run {|@vm| ... } ⇒ Object
- #stop ⇒ Object
Methods included from Lifecycle
#running?, #shutdown?, #stopped?, #warmup?
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Client
Returns a new instance of Client.
12 13 14 15 16 17 18 |
# File 'lib/gisele/vm/proxy/client.rb', line 12 def initialize( = {}) init_lifecycle @options = Proxy..merge() @registry = Registry.new(self) yield(self) if block_given? @logger ||= Logger.new($stdout, Logger::DEBUG) end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/gisele/vm/proxy/client.rb', line 9 def logger @logger end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/gisele/vm/proxy/client.rb', line 8 def @options end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
10 11 12 |
# File 'lib/gisele/vm/proxy/client.rb', line 10 def registry @registry end |
Instance Method Details
#run {|@vm| ... } ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/gisele/vm/proxy/client.rb', line 24 def run DRb.start_service @vm = DRbObject.new nil, [:uri] @vm.to_s yield(@vm) if block_given? super end |
#stop ⇒ Object
32 33 34 35 |
# File 'lib/gisele/vm/proxy/client.rb', line 32 def stop DRb.stop_service super end |