Class: Pione::DRbPatch::RequestInvoker

Inherits:
Object
  • Object
show all
Defined in:
lib/pione/patch/drb-patch.rb

Instance Method Summary collapse

Constructor Details

#initialize(server, client, request) ⇒ RequestInvoker

Returns a new instance of RequestInvoker.



376
377
378
379
380
381
# File 'lib/pione/patch/drb-patch.rb', line 376

def initialize(server, client, request)
  @server = server
  @client = client
  @request = request
  check_insecure_method
end

Instance Method Details

#invokeObject



383
384
385
386
387
388
389
390
391
392
393
# File 'lib/pione/patch/drb-patch.rb', line 383

def invoke
  # evaluate request
  succ, result = execute_request

  # send_reply with req_id
  begin
    @client.send_reply(@request.req_id, succ, result)
  rescue => e
    Log::Debug.system("it happened communication failure in sending reply(req_id: %s): %s" % [@request.req_id, e.message])
  end
end