Class: RPCMapper::Adapters::BERTRPCAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/rpc_mapper/adapters/bertrpc_adapter.rb

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#config, #type

Instance Method Summary collapse

Methods inherited from AbstractAdapter

create, #delete, #extend_adapter, #initialize, register_as, #write

Methods included from Logger

included

Constructor Details

This class inherits a constructor from RPCMapper::Adapters::AbstractAdapter

Instance Method Details

#read(options) ⇒ Object



13
14
15
# File 'lib/rpc_mapper/adapters/bertrpc_adapter.rb', line 13

def read(options)
  log(options, "RPC #{config[:service]}") { self.service.call.send(self.namespace).send(self.service_name, options.merge(config[:default_options] || {})) }
end

#serviceObject



9
10
11
# File 'lib/rpc_mapper/adapters/bertrpc_adapter.rb', line 9

def service
  @@service_pool["#{config[:host]}:#{config[:port]}"] ||= BERTRPC::Service.new(self.config[:host], self.config[:port])
end