Class: Qpid::Proton::Container::ConnectionTask
- Inherits:
-
HandlerDriver
- Object
- Qpid::Proton::ConnectionDriver
- HandlerDriver
- Qpid::Proton::Container::ConnectionTask
- Defined in:
- lib/core/container.rb
Instance Attribute Summary
Attributes inherited from HandlerDriver
Instance Method Summary collapse
-
#dispatch
Intercept dispatch to close work_queue.
-
#initialize(container, io, opts, server = false) ⇒ ConnectionTask
constructor
A new instance of ConnectionTask.
- #next_tick
- #process(now)
Methods inherited from Qpid::Proton::ConnectionDriver
#can_read?, #can_write?, #close, #close_read, #close_write, #connection, #each_event, #event, #event?, #finished?, #read, #read_closed?, #tick, #to_io, #transport, #write, #write_closed?
Constructor Details
#initialize(container, io, opts, server = false) ⇒ ConnectionTask
Returns a new instance of ConnectionTask.
258 259 260 261 262 263 264 265 |
# File 'lib/core/container.rb', line 258 def initialize container, io, opts, server=false super io, opts[:handler] transport.set_server if server transport.apply opts connection.apply opts @work_queue = WorkQueue.new(container) connection.instance_variable_set(:@work_queue, @work_queue) end |
Instance Method Details
#dispatch
Intercept dispatch to close work_queue
269 270 271 272 |
# File 'lib/core/container.rb', line 269 def dispatch # Intercept dispatch to close work_queue super @work_queue.close if read_closed? && write_closed? end |
#next_tick
266 |
# File 'lib/core/container.rb', line 266 def next_tick() earliest(super, @work_queue.next_tick); end |
#process(now)
267 |
# File 'lib/core/container.rb', line 267 def process(now) @work_queue.process(now); super(); end |