Class: Qup::Adapter::Kestrel::Destination
- Inherits:
-
Object
- Object
- Qup::Adapter::Kestrel::Destination
- Defined in:
- lib/qup/adapter/kestrel/destination.rb
Overview
Internal: The Common base class for Kestrel Topic and Queue
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Internal: the name of the Queue or Topic.
Instance Method Summary collapse
-
#destroy ⇒ Object
Internal: Destroy the Topic or Queue.
-
#initialize(client, name) ⇒ Destination
constructor
Internal: Create a new Topic or Queue.
-
#ping ⇒ Object
Internal: Make sure the Topic or Queue exists.
Constructor Details
#initialize(client, name) ⇒ Destination
Internal: Create a new Topic or Queue
address - the Connection Address string for the Kestrel Client name - the String name of the Topic or Queue
Returns a new Topic or Queue.
15 16 17 18 19 |
# File 'lib/qup/adapter/kestrel/destination.rb', line 15 def initialize( client, name ) @client = client @name = name ping end |
Instance Attribute Details
#name ⇒ Object (readonly)
Internal: the name of the Queue or Topic
7 8 9 |
# File 'lib/qup/adapter/kestrel/destination.rb', line 7 def name @name end |
Instance Method Details
#destroy ⇒ Object
Internal: Destroy the Topic or Queue
If possible remove the existence of the Topic from the System
Returns nothing.
26 27 28 |
# File 'lib/qup/adapter/kestrel/destination.rb', line 26 def destroy @client.delete( name ) end |
#ping ⇒ Object
Internal: Make sure the Topic or Queue exists
Returns nothing
33 34 35 36 |
# File 'lib/qup/adapter/kestrel/destination.rb', line 33 def ping @client.peek( name ) return true end |