Class: RPCMapper::Adapters::BERTRPCAdapter
- Inherits:
-
AbstractAdapter
- Object
- AbstractAdapter
- RPCMapper::Adapters::BERTRPCAdapter
- Defined in:
- lib/rpc_mapper/adapters/bertrpc_adapter.rb
Instance Attribute Summary
Attributes inherited from AbstractAdapter
Instance Method Summary collapse
Methods inherited from AbstractAdapter
create, #delete, #extend_adapter, #initialize, register_as, #write
Methods included from Logger
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() log(, "RPC #{config[:service]}") { self.service.call.send(self.namespace).send(self.service_name, .merge(config[:default_options] || {})) } end |
#service ⇒ Object
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 |