Class: Seahorse::Client::HandlerListEntry
- Inherits:
-
Object
- Object
- Seahorse::Client::HandlerListEntry
- Defined in:
- gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb
Overview
A container for an un-constructed handler. A handler entry has the handler class, and information about handler priority/order.
This class is an implementation detail of the HandlerList class. Do not rely on public interfaces of this class.
Constant Summary collapse
- STEPS =
{ initialize: 400, validate: 300, build: 200, sign: 100, send: 0, }
Instance Attribute Summary collapse
-
#handler_class ⇒ Handler, Class<Handler>
readonly
Returns the handler.
-
#inserted ⇒ Integer
readonly
The insertion order/position.
-
#operations ⇒ Set<String>
readonly
-
#priority ⇒ Integer
readonly
-
#step ⇒ Symbol
readonly
-
#weight ⇒ Integer
readonly
Instance Method Summary collapse
-
#copy(options = {}) ⇒ HandlerListEntry
-
#initialize(options) ⇒ HandlerListEntry
constructor
A new instance of HandlerListEntry.
Constructor Details
#initialize(options) ⇒ HandlerListEntry
Returns a new instance of HandlerListEntry.
28 29 30 31 32 33 34 35 36 37 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 28 def initialize() @options = @handler_class = option(:handler_class, ) @inserted = option(:inserted, ) @operations = [:operations] @operations = Set.new([:operations]).map(&:to_s) if @operations set_step([:step] || :build) set_priority([:priority] || 50) compute_weight end |
Instance Attribute Details
#handler_class ⇒ Handler, Class<Handler> (readonly)
Returns the handler. This may be a constructed handler object or a handler class.
41 42 43 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 41 def handler_class @handler_class end |
#inserted ⇒ Integer (readonly)
Returns The insertion order/position. This is used to determine sort order when two entries have the same priority. Entries inserted later (with a higher inserted value) have a lower priority.
47 48 49 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 47 def inserted @inserted end |
#operations ⇒ Set<String> (readonly)
56 57 58 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 56 def operations @operations end |
#priority ⇒ Integer (readonly)
53 54 55 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 53 def priority @priority end |
#step ⇒ Symbol (readonly)
50 51 52 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 50 def step @step end |
#weight ⇒ Integer (readonly)
59 60 61 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 59 def weight @weight end |
Instance Method Details
#copy(options = {}) ⇒ HandlerListEntry
72 73 74 |
# File 'gems/aws-sdk-core/lib/seahorse/client/handler_list_entry.rb', line 72 def copy( = {}) HandlerListEntry.new(@options.merge()) end |