Class: HttpReactor::SessionRequestCallback
- Inherits:
-
Object
- Object
- HttpReactor::SessionRequestCallback
- Defined in:
- lib/http_reactor/client.rb
Overview
:nodoc:
Instance Method Summary collapse
- #cancelled(request) ⇒ Object
- #completed(request) ⇒ Object
- #failed(request) ⇒ Object
-
#initialize(request_count) ⇒ SessionRequestCallback
constructor
A new instance of SessionRequestCallback.
- #timeout(request) ⇒ Object
Constructor Details
#initialize(request_count) ⇒ SessionRequestCallback
Returns a new instance of SessionRequestCallback.
99 100 101 |
# File 'lib/http_reactor/client.rb', line 99 def initialize(request_count) @request_count = request_count end |
Instance Method Details
#cancelled(request) ⇒ Object
103 104 105 106 |
# File 'lib/http_reactor/client.rb', line 103 def cancelled(request) puts "Connect request cancelled: #{request.remote_address}" @request_count.count_down() end |
#completed(request) ⇒ Object
108 |
# File 'lib/http_reactor/client.rb', line 108 def completed(request); end |
#failed(request) ⇒ Object
110 111 112 113 |
# File 'lib/http_reactor/client.rb', line 110 def failed(request) puts "Connect request failed: #{request.remote_address}" @request_count.count_down() end |
#timeout(request) ⇒ Object
115 116 117 118 |
# File 'lib/http_reactor/client.rb', line 115 def timeout(request) puts "Connect request timed out: #{request.remote_address}" @request_count.count_down() end |