Class: Aws::Plugins::RequestCompression::CompressionHandler Private

Inherits:
Seahorse::Client::Handler show all
Defined in:
lib/aws-sdk-core/plugins/request_compression.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: ChunkBuffer, GzipIO

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Handler

#initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

Instance Method Details

#call(context) ⇒ 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



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/aws-sdk-core/plugins/request_compression.rb', line 83

def call(context)
  if should_compress?(context)
    selected_encoding = request_encoding_selection(context)
    if selected_encoding
      if streaming?(context.operation.input)
        process_streaming_compression(selected_encoding, context)
      elsif context.http_request.body.size >= context.config.request_min_compression_size_bytes
        process_compression(selected_encoding, context)
      end
    end
  end
  with_metric(selected_encoding) { @handler.call(context) }
end