Class: Seahorse::Client::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/seahorse/client/handler.rb

Direct Known Subclasses

Aws::Binary::DecodeHandler, Aws::Binary::EncodeHandler, Aws::Json::Handler, Aws::Plugins::APIGAuthorizerToken::AuthTokenHandler, Aws::Plugins::APIGUserAgent::Handler, Aws::Plugins::ApiKey::ApiKeyHandler, Aws::Plugins::ApiKey::OptionHandler, Aws::Plugins::ClientMetricsPlugin::Handler, Aws::Plugins::ClientMetricsSendPlugin::AttemptHandler, Aws::Plugins::ClientMetricsSendPlugin::LatencyHandler, Aws::Plugins::EndpointDiscovery::Handler, Aws::Plugins::EndpointPattern::Handler, Aws::Plugins::HelpfulSocketErrors::Handler, Aws::Plugins::HttpChecksum::Handler, Aws::Plugins::IdempotencyToken::Handler, Aws::Plugins::InvocationId::Handler, Aws::Plugins::JsonvalueConverter::Handler, Aws::Plugins::Logging::Handler, Aws::Plugins::ParamConverter::Handler, Aws::Plugins::ParamValidator::Handler, Aws::Plugins::Protocols::ApiGateway::ContentTypeHandler, Aws::Plugins::Protocols::RestJson::ContentTypeHandler, Aws::Plugins::ResponsePaging::Handler, Aws::Plugins::RetryErrors::Handler, Aws::Plugins::RetryErrors::LegacyHandler, Aws::Plugins::SignatureV2::Handler, Aws::Plugins::SignatureV4::Handler, Aws::Plugins::StubResponses::Handler, Aws::Plugins::TransferEncoding::Handler, Aws::Plugins::UserAgent::Handler, Aws::Query::Handler, Aws::Rest::Handler, Aws::Xml::ErrorHandler, Seahorse::Client::H2::Handler, Logging::Handler, NetHttp::Handler, Plugins::ContentLength::Handler, Plugins::Endpoint::Handler, Plugins::RaiseResponseErrors::Handler, Plugins::RequestCallback::OptionHandler, Plugins::RequestCallback::ReadCallbackHandler, Plugins::ResponseTarget::Handler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(handler = nil) ⇒ Handler

Returns a new instance of Handler.

Parameters:

  • handler (Handler) (defaults to: nil)

    (nil) The next handler in the stack that should be called from within the #call method. This value must only be nil for send handlers.


10
11
12
# File 'lib/seahorse/client/handler.rb', line 10

def initialize(handler = nil)
  @handler = handler
end

Instance Attribute Details

#handlerHandler?

Returns:


15
16
17
# File 'lib/seahorse/client/handler.rb', line 15

def handler
  @handler
end

Instance Method Details

#call(context) ⇒ Response

Parameters:

Returns:


19
20
21
# File 'lib/seahorse/client/handler.rb', line 19

def call(context)
  @handler.call(context)
end

#inspectObject


23
24
25
# File 'lib/seahorse/client/handler.rb', line 23

def inspect
  "#<#{self.class.name||'UnnamedHandler'} @handler=#{@handler.inspect}>"
end