Class: Ap4r::AsyncHelper::Converters::Druby
- Defined in:
- lib/ap4r/async_helper.rb
Constant Summary collapse
- OPTION_KEY =
:receiver
- @@default_url =
"druby://localhost:9999"
Instance Method Summary collapse
-
#initialize(url_options, async_params, rm_options, url_for_handler) ⇒ Druby
constructor
A new instance of Druby.
- #make_params ⇒ Object
- #make_rm_options ⇒ Object
- #queue_name ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(url_options, async_params, rm_options, url_for_handler) ⇒ Druby
Returns a new instance of Druby.
341 342 343 344 |
# File 'lib/ap4r/async_helper.rb', line 341 def initialize(, async_params, , url_for_handler) super @url_options[:url] ||= @@default_url end |
Instance Method Details
#make_params ⇒ Object
357 358 359 |
# File 'lib/ap4r/async_helper.rb', line 357 def make_params @async_params end |
#make_rm_options ⇒ Object
361 362 363 364 365 366 367 368 369 370 |
# File 'lib/ap4r/async_helper.rb', line 361 def @rm_options[:target_url] ||= if @url_options[OPTION_KEY] "#{@url_options[:url]}?#{@url_options[OPTION_KEY]}" else @url_options[:url] end @rm_options[:target_method] = @url_options[:message] @rm_options end |
#queue_name ⇒ Object
346 347 348 349 350 351 352 353 354 355 |
# File 'lib/ap4r/async_helper.rb', line 346 def queue_name queue_name = @rm_options[:queue] return queue_name if queue_name @rm_options[:queue] = [AsyncHelper::Base.default_queue_prefix.chomp("."), @url_options[OPTION_KEY].to_s || "druby", @url_options[:message].to_s].join(".") @rm_options[:queue] end |