# Author:: Nicolas Despres . # Copyright:: Copyright (c) 2004, 2005 TTK team. All rights reserved. # License:: LGPL # $Id: Client.rb 567 2005-04-13 08:00:06Z polrop $ require 'ttk/fetchers/client/receiver' module TTK module Fetchers class Client include DRb::DRbUndumped def initialize(service, fetcher) @service = service @fetcher = fetcher end attr_reader :fetcher def uri @service.uri end def fetch(resource, dest) recv = Receiver.new(dest + resource) # keep this local variable for GC @fetcher.fetch(resource, recv) recv.stat end end # class Client end # module Fetchers end # module TTK