Class: Aws::Lambda::EventStreams::InvokeWithResponseStreamResponseEvent
- Inherits:
-
Object
- Object
- Aws::Lambda::EventStreams::InvokeWithResponseStreamResponseEvent
- Defined in:
- lib/aws-sdk-lambda/event_streams.rb
Instance Attribute Summary collapse
-
#event_emitter ⇒ Object
readonly
private
Aws::EventEmitter.
Instance Method Summary collapse
-
#initialize ⇒ InvokeWithResponseStreamResponseEvent
constructor
A new instance of InvokeWithResponseStreamResponseEvent.
- #on_error_event(&block) ⇒ Object
- #on_event(&block) ⇒ Object
- #on_initial_response_event(&block) ⇒ Object
- #on_invoke_complete_event(&block) ⇒ Object
- #on_payload_chunk_event(&block) ⇒ Object
- #on_unknown_event(&block) ⇒ Object
Constructor Details
#initialize ⇒ InvokeWithResponseStreamResponseEvent
Returns a new instance of InvokeWithResponseStreamResponseEvent.
14 15 16 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 14 def initialize @event_emitter = Aws::EventEmitter.new end |
Instance Attribute Details
#event_emitter ⇒ Object (readonly)
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.
Returns Aws::EventEmitter.
48 49 50 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 48 def event_emitter @event_emitter end |
Instance Method Details
#on_error_event(&block) ⇒ Object
26 27 28 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 26 def on_error_event(&block) @event_emitter.on(:error, block) if block_given? end |
#on_event(&block) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 38 def on_event(&block) on_payload_chunk_event(&block) on_invoke_complete_event(&block) on_error_event(&block) on_initial_response_event(&block) on_unknown_event(&block) end |
#on_initial_response_event(&block) ⇒ Object
30 31 32 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 30 def on_initial_response_event(&block) @event_emitter.on(:initial_response, block) if block_given? end |
#on_invoke_complete_event(&block) ⇒ Object
22 23 24 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 22 def on_invoke_complete_event(&block) @event_emitter.on(:invoke_complete, block) if block_given? end |
#on_payload_chunk_event(&block) ⇒ Object
18 19 20 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 18 def on_payload_chunk_event(&block) @event_emitter.on(:payload_chunk, block) if block_given? end |
#on_unknown_event(&block) ⇒ Object
34 35 36 |
# File 'lib/aws-sdk-lambda/event_streams.rb', line 34 def on_unknown_event(&block) @event_emitter.on(:unknown_event, block) if block_given? end |