Sha256: ceecd032e857076d3eccd381cb6ad03d7be1b5a56bf76fdb87fd5d3f9dc411b6

Contents?: true

Size: 746 Bytes

Versions: 34

Compression:

Stored size: 746 Bytes

Contents

module Cuboid

require Options.paths.lib + 'rpc/client/base'

module RPC
class Client

# RPC Scheduler client
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
class Scheduler
    # Not always available, set by the parent.
    attr_accessor :pid

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

    def url
        @client.url
    end

    def address
        @client.address
    end

    def port
        @client.port
    end

    def close
        @client.close
    end

    private

    # Used to provide the illusion of locality for remote methods
    def method_missing( sym, *args, &block )
        @client.call( "scheduler.#{sym.to_s}", *args, &block )
    end

end

end
end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
cuboid-0.2.13 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.12 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.11 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.10 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.9 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.8 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.7 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.6 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.5 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.4.2 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.4.1 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.4 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.3 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.2 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2.1 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.2 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.1.9.1 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.1.9 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.1.8 lib/cuboid/rpc/client/scheduler.rb
cuboid-0.1.7 lib/cuboid/rpc/client/scheduler.rb