Class: Temporalio::Client::Interceptor::Outbound

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/client/interceptor.rb

Overview

Outbound interceptor for intercepting client calls. This should be extended by users needing to intercept client actions.

Direct Known Subclasses

Internal::Client::Implementation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(next_interceptor) ⇒ Outbound

Initialize outbound with the next interceptor in the chain.

Parameters:

  • next_interceptor (Outbound)

    Next interceptor in the chain.



197
198
199
# File 'lib/temporalio/client/interceptor.rb', line 197

def initialize(next_interceptor)
  @next_interceptor = next_interceptor
end

Instance Attribute Details

#next_interceptorOutbound (readonly)

Returns Next interceptor in the chain.

Returns:

  • (Outbound)

    Next interceptor in the chain.



192
193
194
# File 'lib/temporalio/client/interceptor.rb', line 192

def next_interceptor
  @next_interceptor
end

Instance Method Details

#cancel_workflow(input) ⇒ Object

Called for every WorkflowHandle#cancel call.

Parameters:



275
276
277
# File 'lib/temporalio/client/interceptor.rb', line 275

def cancel_workflow(input)
  next_interceptor.cancel_workflow(input)
end

#complete_async_activity(input) ⇒ Object

Called for every AsyncActivityHandle#complete call.

Parameters:



296
297
298
# File 'lib/temporalio/client/interceptor.rb', line 296

def complete_async_activity(input)
  next_interceptor.complete_async_activity(input)
end

#count_workflows(input) ⇒ WorkflowExecutionCount

Called for every Temporalio::Client#count_workflows call.

Parameters:

Returns:



221
222
223
# File 'lib/temporalio/client/interceptor.rb', line 221

def count_workflows(input)
  next_interceptor.count_workflows(input)
end

#describe_workflow(input) ⇒ WorkflowExecution::Description

Called for every WorkflowHandle#describe call.

Parameters:

Returns:



229
230
231
# File 'lib/temporalio/client/interceptor.rb', line 229

def describe_workflow(input)
  next_interceptor.describe_workflow(input)
end

#fail_async_activity(input) ⇒ Object

Called for every AsyncActivityHandle#fail call.

Parameters:



303
304
305
# File 'lib/temporalio/client/interceptor.rb', line 303

def fail_async_activity(input)
  next_interceptor.fail_async_activity(input)
end

#fetch_workflow_history_events(input) ⇒ Enumerator<Api::History::V1::HistoryEvent>

Called everytime the client needs workflow history. This includes getting the result.

Parameters:

Returns:



237
238
239
# File 'lib/temporalio/client/interceptor.rb', line 237

def fetch_workflow_history_events(input)
  next_interceptor.fetch_workflow_history_events(input)
end

#heartbeat_async_activity(input) ⇒ Object

Called for every AsyncActivityHandle#heartbeat call.

Parameters:



289
290
291
# File 'lib/temporalio/client/interceptor.rb', line 289

def heartbeat_async_activity(input)
  next_interceptor.heartbeat_async_activity(input)
end

#list_workflows(input) ⇒ Enumerator<WorkflowExecution>

Called for every Temporalio::Client#list_workflows call.

Parameters:

Returns:



213
214
215
# File 'lib/temporalio/client/interceptor.rb', line 213

def list_workflows(input)
  next_interceptor.list_workflows(input)
end

#poll_workflow_update(input) ⇒ Api::Update::V1::Outcome

Called when polling for update result.

Parameters:

Returns:



268
269
270
# File 'lib/temporalio/client/interceptor.rb', line 268

def poll_workflow_update(input)
  next_interceptor.poll_workflow_update(input)
end

#query_workflow(input) ⇒ Object?

Called for every WorkflowHandle#query call.

Parameters:

Returns:

  • (Object, nil)

    Query result.



252
253
254
# File 'lib/temporalio/client/interceptor.rb', line 252

def query_workflow(input)
  next_interceptor.query_workflow(input)
end

#report_cancellation_async_activity(input) ⇒ Object

Parameters:



310
311
312
# File 'lib/temporalio/client/interceptor.rb', line 310

def report_cancellation_async_activity(input)
  next_interceptor.report_cancellation_async_activity(input)
end

#signal_workflow(input) ⇒ Object

Called for every WorkflowHandle#signal call.

Parameters:



244
245
246
# File 'lib/temporalio/client/interceptor.rb', line 244

def signal_workflow(input)
  next_interceptor.signal_workflow(input)
end

#start_workflow(input) ⇒ WorkflowHandle

Parameters:

Returns:



205
206
207
# File 'lib/temporalio/client/interceptor.rb', line 205

def start_workflow(input)
  next_interceptor.start_workflow(input)
end

#start_workflow_update(input) ⇒ WorkflowUpdateHandle

Called for every WorkflowHandle#start_update call.

Parameters:

Returns:



260
261
262
# File 'lib/temporalio/client/interceptor.rb', line 260

def start_workflow_update(input)
  next_interceptor.start_workflow_update(input)
end

#terminate_workflow(input) ⇒ Object

Called for every WorkflowHandle#terminate call.

Parameters:



282
283
284
# File 'lib/temporalio/client/interceptor.rb', line 282

def terminate_workflow(input)
  next_interceptor.terminate_workflow(input)
end