Class: Harmoniser::Mock::Connection
- Inherits:
-
Object
- Object
- Harmoniser::Mock::Connection
- Defined in:
- lib/harmoniser/mock/connection.rb
Instance Method Summary collapse
- #close ⇒ Object
- #create_channel(id = nil, consumer_pool_size = 1, consumer_pool_ack = false, consumer_pool_shutdown_timeout = 60) ⇒ Object
-
#initialize(opts = {}, error_handler: nil, logger: nil) ⇒ Connection
constructor
A new instance of Connection.
- #open? ⇒ Boolean
- #recovering_from_network_failure? ⇒ Boolean
- #start ⇒ Object
Constructor Details
#initialize(opts = {}, error_handler: nil, logger: nil) ⇒ Connection
Returns a new instance of Connection.
8 9 10 11 12 13 |
# File 'lib/harmoniser/mock/connection.rb', line 8 def initialize(opts = {}, error_handler: nil, logger: nil) @opts = opts @error_handler = error_handler @logger = logger @open = false end |
Instance Method Details
#close ⇒ Object
32 33 34 35 |
# File 'lib/harmoniser/mock/connection.rb', line 32 def close @open = false true end |
#create_channel(id = nil, consumer_pool_size = 1, consumer_pool_ack = false, consumer_pool_shutdown_timeout = 60) ⇒ Object
15 16 17 |
# File 'lib/harmoniser/mock/connection.rb', line 15 def create_channel(id = nil, consumer_pool_size = 1, consumer_pool_ack = false, consumer_pool_shutdown_timeout = 60) Channel.new end |
#open? ⇒ Boolean
19 20 21 |
# File 'lib/harmoniser/mock/connection.rb', line 19 def open? @open end |
#recovering_from_network_failure? ⇒ Boolean
23 24 25 |
# File 'lib/harmoniser/mock/connection.rb', line 23 def recovering_from_network_failure? false end |
#start ⇒ Object
27 28 29 30 |
# File 'lib/harmoniser/mock/connection.rb', line 27 def start @open = true self end |