Class: Seahorse::Client::NetHttp::ConnectionPool::ExtendedSession Private
- Inherits:
-
Delegator
- Object
- Delegator
- Seahorse::Client::NetHttp::ConnectionPool::ExtendedSession
- Defined in:
- lib/seahorse/client/net_http/connection_pool.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Helper methods extended onto Net::HTTPSession objects opened by the connection pool.
Instance Attribute Summary collapse
- #last_used ⇒ Integer? readonly private
Instance Method Summary collapse
- #__getobj__ ⇒ Object private
- #__setobj__(obj) ⇒ Object private
-
#finish ⇒ Object
private
Attempts to close/finish the session without raising an error.
-
#initialize(http) ⇒ ExtendedSession
constructor
private
A new instance of ExtendedSession.
-
#request(*args, &block) ⇒ Object
private
Sends the request and tracks that this session has been used.
Constructor Details
#initialize(http) ⇒ ExtendedSession
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExtendedSession.
331 332 333 334 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 331 def initialize(http) super(http) @http = http end |
Instance Attribute Details
#last_used ⇒ Integer? (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
337 338 339 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 337 def last_used @last_used end |
Instance Method Details
#__getobj__ ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
339 340 341 342 343 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 339 def __getobj__ return yield if block_given? && !defined?(@http) @http end |
#__setobj__(obj) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
345 346 347 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 345 def __setobj__(obj) @http = obj end |
#finish ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Attempts to close/finish the session without raising an error.
356 357 358 359 360 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 356 def finish @http.finish rescue IOError nil end |
#request(*args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Sends the request and tracks that this session has been used.
350 351 352 353 |
# File 'lib/seahorse/client/net_http/connection_pool.rb', line 350 def request(*args, &block) @http.request(*args, &block) @last_used = Aws::Util.monotonic_milliseconds end |