Class: Cuboid::RPC::Client::Scheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/cuboid/rpc/client/scheduler.rb

Overview

RPC Scheduler client

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = nil) ⇒ Scheduler

Returns a new instance of Scheduler.



15
16
17
# File 'lib/cuboid/rpc/client/scheduler.rb', line 15

def initialize( url, options = nil )
    @client = Base.new( url, nil, options )
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args, &block) ⇒ Object (private)

Used to provide the illusion of locality for remote methods



38
39
40
# File 'lib/cuboid/rpc/client/scheduler.rb', line 38

def method_missing( sym, *args, &block )
    @client.call( "scheduler.#{sym.to_s}", *args, &block )
end

Instance Attribute Details

#pidObject

Not always available, set by the parent.



13
14
15
# File 'lib/cuboid/rpc/client/scheduler.rb', line 13

def pid
  @pid
end

Instance Method Details

#addressObject



23
24
25
# File 'lib/cuboid/rpc/client/scheduler.rb', line 23

def address
    @client.address
end

#closeObject



31
32
33
# File 'lib/cuboid/rpc/client/scheduler.rb', line 31

def close
    @client.close
end

#portObject



27
28
29
# File 'lib/cuboid/rpc/client/scheduler.rb', line 27

def port
    @client.port
end

#urlObject



19
20
21
# File 'lib/cuboid/rpc/client/scheduler.rb', line 19

def url
    @client.url
end