Module: AMQ::Client::Async::Entity Abstract
- Defined in:
- lib/amq/client/async/entity.rb
Overview
This module is abstract.
Note:
Exchanges and queues implementation is based on this class.
AMQ entities, as implemented by AMQ::Client, have callbacks and can run them when necessary.
Constant Summary
Constants included from Openable
Instance Attribute Summary collapse
- #callbacks ⇒ Array<#call> readonly
Attributes included from Openable
Instance Method Summary collapse
Methods included from Callbacks
#clear_callbacks, #define_callback, #exec_callback, #exec_callback_once, #exec_callback_once_yielding_self, #exec_callback_yielding_self, #has_callback?, #prepend_callback, #redefine_callback
Methods included from Openable
#closed!, #closed?, #closing!, #closing?, #opened!, #opened?, #opening!, #opening?
Instance Attribute Details
#callbacks ⇒ Array<#call> (readonly)
54 55 56 |
# File 'lib/amq/client/async/entity.rb', line 54 def callbacks @callbacks end |
Instance Method Details
#initialize(connection) ⇒ Object
57 58 59 60 61 62 |
# File 'lib/amq/client/async/entity.rb', line 57 def initialize(connection) @connection = connection # Be careful with default values for #ruby hashes: h = Hash.new(Array.new); h[:key] ||= 1 # won't assign anything to :key. MK. @callbacks = Hash.new end |