Class: Temporalio::Worker::Interceptor::Workflow::Inbound
- Inherits:
-
Object
- Object
- Temporalio::Worker::Interceptor::Workflow::Inbound
- Defined in:
- lib/temporalio/worker/interceptor.rb
Overview
Inbound interceptor for intercepting inbound workflow calls. This should be extended by users needing to intercept workflows.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#next_interceptor ⇒ Inbound
readonly
Next interceptor in the chain.
Instance Method Summary collapse
-
#execute(input) ⇒ Object
Execute a workflow and return result or raise exception.
-
#handle_query(input) ⇒ Object
Handle a workflow query and return result or raise exception.
-
#handle_signal(input) ⇒ Object
Handle a workflow signal.
-
#handle_update(input) ⇒ Object
Handle a workflow update and return result or raise exception.
-
#init(outbound) ⇒ Outbound
Initialize the outbound interceptor.
-
#initialize(next_interceptor) ⇒ Inbound
constructor
Initialize inbound with the next interceptor in the chain.
-
#validate_update(input) ⇒ Object
Validate a workflow update.
Constructor Details
#initialize(next_interceptor) ⇒ Inbound
Initialize inbound with the next interceptor in the chain.
143 144 145 |
# File 'lib/temporalio/worker/interceptor.rb', line 143 def initialize(next_interceptor) @next_interceptor = next_interceptor end |
Instance Attribute Details
#next_interceptor ⇒ Inbound (readonly)
Returns Next interceptor in the chain.
138 139 140 |
# File 'lib/temporalio/worker/interceptor.rb', line 138 def next_interceptor @next_interceptor end |
Instance Method Details
#execute(input) ⇒ Object
Execute a workflow and return result or raise exception. Next interceptor in chain (i.e. ‘super`) will perform the execution.
161 162 163 |
# File 'lib/temporalio/worker/interceptor.rb', line 161 def execute(input) @next_interceptor.execute(input) end |
#handle_query(input) ⇒ Object
Handle a workflow query and return result or raise exception. Next interceptor in chain (i.e. ‘super`) will perform the handling.
177 178 179 |
# File 'lib/temporalio/worker/interceptor.rb', line 177 def handle_query(input) @next_interceptor.handle_query(input) end |
#handle_signal(input) ⇒ Object
Handle a workflow signal. Next interceptor in chain (i.e. ‘super`) will perform the handling.
168 169 170 |
# File 'lib/temporalio/worker/interceptor.rb', line 168 def handle_signal(input) @next_interceptor.handle_signal(input) end |
#handle_update(input) ⇒ Object
Handle a workflow update and return result or raise exception. Next interceptor in chain (i.e. ‘super`) will perform the handling.
193 194 195 |
# File 'lib/temporalio/worker/interceptor.rb', line 193 def handle_update(input) @next_interceptor.handle_update(input) end |
#init(outbound) ⇒ Outbound
Initialize the outbound interceptor. This should be extended by users to return their own Outbound implementation that wraps the parameter here.
152 153 154 |
# File 'lib/temporalio/worker/interceptor.rb', line 152 def init(outbound) @next_interceptor.init(outbound) end |
#validate_update(input) ⇒ Object
Validate a workflow update. Next interceptor in chain (i.e. ‘super`) will perform the validation.
184 185 186 |
# File 'lib/temporalio/worker/interceptor.rb', line 184 def validate_update(input) @next_interceptor.validate_update(input) end |