Class BaseRootWorkflowInboundCallsInterceptor
java.lang.Object
io.temporal.internal.sync.BaseRootWorkflowInboundCallsInterceptor
- All Implemented Interfaces:
WorkflowInboundCallsInterceptor
public abstract class BaseRootWorkflowInboundCallsInterceptor
extends Object
implements WorkflowInboundCallsInterceptor
Provides core functionality for a root WorkflowInboundCallsInterceptor that is reused by specific
root RootWorkflowInboundCallsInterceptor implementations inside
DynamicSyncWorkflowDefinition and POJOWorkflowImplementationFactory
Root WorkflowInboundCallsInterceptor is an interceptor that should be at the end of
the WorkflowInboundCallsInterceptor interceptors chain and which encapsulates calls into
Temporal internals while providing a WorkflowInboundCallsInterceptor interface for chaining on
top of it.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.temporal.common.interceptors.WorkflowInboundCallsInterceptor
WorkflowInboundCallsInterceptor.QueryInput, WorkflowInboundCallsInterceptor.QueryOutput, WorkflowInboundCallsInterceptor.SignalInput, WorkflowInboundCallsInterceptor.UpdateInput, WorkflowInboundCallsInterceptor.UpdateOutput, WorkflowInboundCallsInterceptor.WorkflowInput, WorkflowInboundCallsInterceptor.WorkflowOutput -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final io.temporal.internal.sync.SyncWorkflowContext -
Constructor Summary
ConstructorsConstructorDescriptionBaseRootWorkflowInboundCallsInterceptor(io.temporal.internal.sync.SyncWorkflowContext workflowContext) -
Method Summary
Modifier and TypeMethodDescriptionCalled when update workflow execution request is delivered to a workflow execution, after passing the validator.Called when a workflow is queried.voidCalled when signal is delivered to a workflow execution.voidinit(WorkflowOutboundCallsInterceptor outboundCalls) Called when workflow class is instantiated.newCallbackThread(Runnable runnable, String name) Intercepts creation of a workflow callback threadnewWorkflowMethodThread(Runnable runnable, String name) Intercepts creation of the workflow main method threadvoidCalled when update workflow execution request is delivered to a workflow execution, before the update is executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.temporal.common.interceptors.WorkflowInboundCallsInterceptor
execute
-
Field Details
-
workflowContext
protected final io.temporal.internal.sync.SyncWorkflowContext workflowContext
-
-
Constructor Details
-
BaseRootWorkflowInboundCallsInterceptor
public BaseRootWorkflowInboundCallsInterceptor(io.temporal.internal.sync.SyncWorkflowContext workflowContext)
-
-
Method Details
-
init
Description copied from interface:WorkflowInboundCallsInterceptorCalled when workflow class is instantiated. May create aWorkflowOutboundCallsInterceptorinstance. The instance must forward all the calls tooutboundCalls, but it may change the input parameters.The instance should be passed into the {next.init(newWorkflowOutboundCallsInterceptor)}.
See
WorkerInterceptor.interceptWorkflow(io.temporal.common.interceptors.WorkflowInboundCallsInterceptor)for the definition of "next"WorkflowInboundCallsInterceptor.- Specified by:
initin interfaceWorkflowInboundCallsInterceptor- Parameters:
outboundCalls- an existing interceptor instance to be proxied by the interceptor created inside this method
-
handleSignal
Description copied from interface:WorkflowInboundCallsInterceptorCalled when signal is delivered to a workflow execution.- Specified by:
handleSignalin interfaceWorkflowInboundCallsInterceptor
-
handleQuery
public WorkflowInboundCallsInterceptor.QueryOutput handleQuery(WorkflowInboundCallsInterceptor.QueryInput input) Description copied from interface:WorkflowInboundCallsInterceptorCalled when a workflow is queried.- Specified by:
handleQueryin interfaceWorkflowInboundCallsInterceptor
-
validateUpdate
Description copied from interface:WorkflowInboundCallsInterceptorCalled when update workflow execution request is delivered to a workflow execution, before the update is executed.- Specified by:
validateUpdatein interfaceWorkflowInboundCallsInterceptor
-
executeUpdate
public WorkflowInboundCallsInterceptor.UpdateOutput executeUpdate(WorkflowInboundCallsInterceptor.UpdateInput input) Description copied from interface:WorkflowInboundCallsInterceptorCalled when update workflow execution request is delivered to a workflow execution, after passing the validator.- Specified by:
executeUpdatein interfaceWorkflowInboundCallsInterceptor
-
newWorkflowMethodThread
Description copied from interface:WorkflowInboundCallsInterceptorIntercepts creation of the workflow main method thread- Specified by:
newWorkflowMethodThreadin interfaceWorkflowInboundCallsInterceptor- Parameters:
runnable- thread function to runname- name of the thread, optional- Returns:
- created workflow thread. Should be treated as a pass-through object that shouldn't be manipulated in any way by the interceptor code.
-
newCallbackThread
Description copied from interface:WorkflowInboundCallsInterceptorIntercepts creation of a workflow callback thread- Specified by:
newCallbackThreadin interfaceWorkflowInboundCallsInterceptor- Parameters:
runnable- thread function to runname- name of the thread, optional- Returns:
- created workflow thread. Should be treated as a pass-through object that shouldn't be manipulated in any way by the interceptor code.
-