def dispatch(args = {})
    rjr_method = args[:rjr_method]

    # *note* not using concurrent access protection,
    # assumes all handlers/enviroments are registered
    # before first dispatch occurs
    handler     = handler_for(rjr_method)
    environment = env_for(rjr_method)

    return Result.method_not_found(rjr_method) if handler.nil?

    request = Request.new args.merge(:rjr_handler  => handler)

    # set request environment
    request.set_env(environment) unless environment.nil?

    begin
      retval = request.handle
      request.result  = Result.new(:result => retval)

    rescue Exception => e
      warning = "Exception Raised in #{rjr_method} handler #{e}"
      RJR::Logger.warn [warning] + e.backtrace

      request.result = Result.new(:error_code  => -32000,
                                  :error_msg   => e.to_s,
                                  :error_class => e.class)
    end

    store_request request
    return request.result
  end
def dispatch(args = {})
    rjr_method = args[:rjr_method]

    # *note* not using concurrent access protection,
    # assumes all handlers/enviroments are registered
    # before first dispatch occurs
    handler     = handler_for(rjr_method)
    environment = env_for(rjr_method)

    return Result.method_not_found(rjr_method) if handler.nil?

    request = Request.new args.merge(:rjr_handler  => handler)

    # set request environment
    request.set_env(environment) unless environment.nil?

    begin
      retval = request.handle
      request.result  = Result.new(:result => retval)

    rescue Exception => e
      warning = "Exception Raised in #{rjr_method} handler #{e}"
      RJR::Logger.warn [warning] + e.backtrace

      request.result = Result.new(:error_code  => -32000,
                                  :error_msg   => e.to_s,
                                  :error_class => e.class)
    end

    store_request request
    return request.result
  end
Dispatch received request. (used internally by nodes).

 Arguments should include :rjr_method and other parameters
 required to construct a valid Request instance