Class: ActiveMessaging::Adapters::AmazonSqs::Queue
- Inherits:
-
Object
- Object
- ActiveMessaging::Adapters::AmazonSqs::Queue
- Defined in:
- lib/activemessaging/adapters/asqs.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pathinfo ⇒ Object
Returns the value of attribute pathinfo.
-
#visibility_timeout ⇒ Object
Returns the value of attribute visibility_timeout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, domain, vt = nil) ⇒ Queue
constructor
A new instance of Queue.
- #queue_url ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, domain, vt = nil) ⇒ Queue
Returns a new instance of Queue.
458 459 460 |
# File 'lib/activemessaging/adapters/asqs.rb', line 458 def initialize name, domain, vt=nil @name, @pathinfo, @domain, @visibility_timeout = name, pathinfo, domain, vt end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
445 446 447 |
# File 'lib/activemessaging/adapters/asqs.rb', line 445 def domain @domain end |
#name ⇒ Object
Returns the value of attribute name.
445 446 447 |
# File 'lib/activemessaging/adapters/asqs.rb', line 445 def name @name end |
#pathinfo ⇒ Object
Returns the value of attribute pathinfo.
445 446 447 |
# File 'lib/activemessaging/adapters/asqs.rb', line 445 def pathinfo @pathinfo end |
#visibility_timeout ⇒ Object
Returns the value of attribute visibility_timeout.
445 446 447 |
# File 'lib/activemessaging/adapters/asqs.rb', line 445 def visibility_timeout @visibility_timeout end |
Class Method Details
.from_url(url) ⇒ Object
447 448 449 450 451 452 |
# File 'lib/activemessaging/adapters/asqs.rb', line 447 def self.from_url url u = URI.parse(url) name = u.path.gsub(/\//, "") domain = u.host return Queue.new(name,domain) end |
Instance Method Details
#queue_url ⇒ Object
454 455 456 |
# File 'lib/activemessaging/adapters/asqs.rb', line 454 def queue_url "#{pathinfo}/#{name}" end |
#to_s ⇒ Object
462 463 464 |
# File 'lib/activemessaging/adapters/asqs.rb', line 462 def to_s "<AmazonSQS::Queue name='#{name}' url='#{queue_url}' domain='#{domain}'>" end |