Class: Aws::Plugins::StubResponses Private

Inherits:
Seahorse::Client::Plugin show all
Defined in:
lib/aws-sdk-core/plugins/stub_responses.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.

API:

  • private

Defined Under Namespace

Classes: ApiRequestsHandler, StubbingHandler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Plugin

#add_options, after_initialize, after_initialize_hooks, before_initialize, #before_initialize, before_initialize_hooks, handlers, literal, option, options

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response, #handler_for, #new_handler

Instance Method Details

#add_handlers(handlers, config) ⇒ 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.

API:

  • private



43
44
45
46
47
48
# File 'lib/aws-sdk-core/plugins/stub_responses.rb', line 43

def add_handlers(handlers, config)
  return unless config.stub_responses

  handlers.add(ApiRequestsHandler)
  handlers.add(StubbingHandler, step: :send)
end

#after_initialize(client) ⇒ 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.

API:

  • private



50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/aws-sdk-core/plugins/stub_responses.rb', line 50

def after_initialize(client)
  if client.config.stub_responses
    client.setup_stubbing
    client.handlers.remove(RetryErrors::Handler)
    client.handlers.remove(RetryErrors::LegacyHandler)
    client.handlers.remove(ClientMetricsPlugin::Handler)
    client.handlers.remove(ClientMetricsSendPlugin::LatencyHandler)
    client.handlers.remove(ClientMetricsSendPlugin::AttemptHandler)
    client.handlers.remove(Seahorse::Client::Plugins::RequestCallback::OptionHandler)
    client.handlers.remove(Seahorse::Client::Plugins::RequestCallback::ReadCallbackHandler)
  end
end