class Stargate::Client::Protocol::Inproc

Internal: A client implementation compatible with Inproc server engine.

Constants

RegistryNotFoundError

Public Class Methods

new(*) click to toggle source
Calls superclass method Stargate::Client::Protocol::new
# File lib/stargate/client/protocol/inproc.rb, line 9
def initialize(*)
  super
  @registry_version = ::Stargate::INPROC[uri.to_s]
  @caller = ::Stargate::Server::Caller.new(@registry_version)
  raise RegistryNotFoundError, "Local registry not found: #{uri.to_s}" unless @registry_version
end

Public Instance Methods

call(klass, method, *args) click to toggle source
# File lib/stargate/client/protocol/inproc.rb, line 20
def call(klass, method, *args)
  unpack_payload(@caller.call(klass.remote_name, method, *args))
rescue => err
  raise RemoteExecutionError.new(err.class.to_s, err.message)
end
fetch_definitions() click to toggle source
# File lib/stargate/client/protocol/inproc.rb, line 16
def fetch_definitions
  unpack_definitions(@registry_version.definitions.map(&:serialize))
end