class QRPC::Client
Queue RPC client.
@note Since 0.3.0, all non-system methods was moved to
{Dispatcher} module for maximal avoiding the user API name conflicts.
@since 0.2.0
Queue RPC client.
@note Since 0.3.0, all non-system methods was moved to the
{Dispatcher} module for maximal avoiding the user API name conflicts.
@since 0.2.0
Queue RPC client.
@note Since 0.3.0, all non-system methods was moved to the
{Dispatcher} module for maximal avoiding the user API name conflicts.
@since 0.2.0
Queue RPC client.
@note Since 0.3.0, all non-system methods was moved to the
{Dispatcher} module for maximal avoiding the user API name conflicts.
@since 0.2.0
Attributes
Holds working dispatcher.
@return [Dispatcher] @since 0.3.0
Public Class Methods
Constructor.
@param [QRPC::Locator] locator of the queues @param [QRPC::Generator] ID generator @param [QRPC::Protocol::Abstract] protocol protocol of the session
# File lib/qrpc/client.rb, line 43 def initialize(locator, generator = QRPC::default_generator, protocol = QRPC::default_protocol) @dispatcher = QRPC::Client::Dispatcher::new(locator, generator, protocol) end
Public Instance Methods
Handles call to RPC. (*********)
Be warn, arguments will be serialized to JSON, so they should be serializable nativelly or implement #to_s
or #to_json
method.
@param [Symbol] name name of the called methods @param [Array] args arguments of the called methods @param [Proc] block callback for returning
# File lib/qrpc/client.rb, line 59 def method_missing(name, *args, &block) @dispatcher.put(@dispatcher.create_job(name, args, &block)) end