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.
145 146 147 |
# File 'lib/temporalio/worker/interceptor.rb', line 145 def initialize(next_interceptor) @next_interceptor = next_interceptor end |
Instance Attribute Details
#next_interceptor ⇒ Inbound (readonly)
Returns Next interceptor in the chain.
140 141 142 |
# File 'lib/temporalio/worker/interceptor.rb', line 140 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.
163 164 165 |
# File 'lib/temporalio/worker/interceptor.rb', line 163 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.
179 180 181 |
# File 'lib/temporalio/worker/interceptor.rb', line 179 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.
170 171 172 |
# File 'lib/temporalio/worker/interceptor.rb', line 170 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.
195 196 197 |
# File 'lib/temporalio/worker/interceptor.rb', line 195 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.
154 155 156 |
# File 'lib/temporalio/worker/interceptor.rb', line 154 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.
186 187 188 |
# File 'lib/temporalio/worker/interceptor.rb', line 186 def validate_update(input) @next_interceptor.validate_update(input) end |