Class: Temporalio::Worker::Interceptor::ActivityInbound
- Inherits:
-
Object
- Object
- Temporalio::Worker::Interceptor::ActivityInbound
- Defined in:
- lib/temporalio/worker/interceptor.rb
Overview
Inbound interceptor for intercepting inbound activity calls. This should be extended by users needing to intercept activities.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#next_interceptor ⇒ ActivityInbound
readonly
Next interceptor in the chain.
Instance Method Summary collapse
-
#execute(input) ⇒ Object
Execute an activity and return result or raise exception.
-
#init(outbound) ⇒ ActivityOutbound
Initialize the outbound interceptor.
-
#initialize(next_interceptor) ⇒ ActivityInbound
constructor
Initialize inbound with the next interceptor in the chain.
Constructor Details
#initialize(next_interceptor) ⇒ ActivityInbound
Initialize inbound with the next interceptor in the chain.
43 44 45 |
# File 'lib/temporalio/worker/interceptor.rb', line 43 def initialize(next_interceptor) @next_interceptor = next_interceptor end |
Instance Attribute Details
#next_interceptor ⇒ ActivityInbound (readonly)
Returns Next interceptor in the chain.
38 39 40 |
# File 'lib/temporalio/worker/interceptor.rb', line 38 def next_interceptor @next_interceptor end |
Instance Method Details
#execute(input) ⇒ Object
Execute an activity and return result or raise exception. Next interceptor in chain (i.e. ‘super`) will perform the execution.
61 62 63 |
# File 'lib/temporalio/worker/interceptor.rb', line 61 def execute(input) @next_interceptor.execute(input) end |
#init(outbound) ⇒ ActivityOutbound
Initialize the outbound interceptor. This should be extended by users to return their own Temporalio::Worker::Interceptor::ActivityOutbound implementation that wraps the parameter here.
52 53 54 |
# File 'lib/temporalio/worker/interceptor.rb', line 52 def init(outbound) @next_interceptor.init(outbound) end |