You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Seahorse::Client::AsyncBase

Inherits:
Base
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/seahorse/client/async_base.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#config, #handlers

Instance Method Summary collapse

Methods inherited from Base

add_plugin, api, #build_request, clear_plugins, define, new, plugins, remove_plugin, set_api, set_plugins

Methods included from HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(plugins, options) ⇒ AsyncBase

Returns a new instance of AsyncBase



12
13
14
15
16
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 12

def initialize(plugins, options)
  super
  @connection = H2::Connection.new(options)
  @options = options
end

Instance Attribute Details

#connectionH2::Connection (readonly)

Returns:

  • (H2::Connection)


19
20
21
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 19

def connection
  @connection
end

Instance Method Details

#close_connectionSymbol

Closes the underlying HTTP2 Connection for the client

Returns:

  • (Symbol)

    Returns the status of the connection (:closed)



29
30
31
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 29

def close_connection
  @connection.close!
end

#connection_errorsObject



43
44
45
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 43

def connection_errors
  @connection.errors
end

#new_connectionSeahorse::Client::H2::Connection

Creates a new HTTP2 Connection for the client

Returns:

  • (Seahorse::Client::H2::Connection)


35
36
37
38
39
40
41
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 35

def new_connection
  if @connection.closed?
    @connection = H2::Connection.new(@options)
  else
    @connection
  end
end

#operation_namesArray<Symbol>

Returns a list of valid async request operation names.

Returns:

  • (Array<Symbol>)

    Returns a list of valid async request operation names.



23
24
25
# File 'gems/aws-sdk-core/lib/seahorse/client/async_base.rb', line 23

def operation_names
  self.class.api.async_operation_names
end