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] ||= @@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 [:target_url] ||= if [OPTION_KEY] "#{@url_options[:url]}?#{@url_options[OPTION_KEY]}" else [:url] end [:target_method] = [:message] 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 = [:queue] return queue_name if queue_name [:queue] = [AsyncHelper::Base.default_queue_prefix.chomp("."), [OPTION_KEY].to_s || "druby", [:message].to_s].join(".") [:queue] end |