Package io.temporal.internal.sync
Class BaseRootWorkflowInboundCallsInterceptor
- java.lang.Object
-
- io.temporal.internal.sync.BaseRootWorkflowInboundCallsInterceptor
-
- All Implemented Interfaces:
WorkflowInboundCallsInterceptor
public abstract class BaseRootWorkflowInboundCallsInterceptor extends java.lang.Object implements WorkflowInboundCallsInterceptor
Provides core functionality for a root WorkflowInboundCallsInterceptor that is reused by specific root RootWorkflowInboundCallsInterceptor implementations insideDynamicSyncWorkflowDefinitionandPOJOWorkflowImplementationFactoryRoot
WorkflowInboundCallsInterceptoris an interceptor that should be at the end of theWorkflowInboundCallsInterceptorinterceptors 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
Fields Modifier and Type Field Description protected io.temporal.internal.sync.SyncWorkflowContextworkflowContext
-
Constructor Summary
Constructors Constructor Description BaseRootWorkflowInboundCallsInterceptor(io.temporal.internal.sync.SyncWorkflowContext workflowContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowInboundCallsInterceptor.UpdateOutputexecuteUpdate(WorkflowInboundCallsInterceptor.UpdateInput input)Called when update workflow execution request is delivered to a workflow execution, after passing the validator.WorkflowInboundCallsInterceptor.QueryOutputhandleQuery(WorkflowInboundCallsInterceptor.QueryInput input)Called when a workflow is queried.voidhandleSignal(WorkflowInboundCallsInterceptor.SignalInput input)Called when signal is delivered to a workflow execution.voidinit(WorkflowOutboundCallsInterceptor outboundCalls)Called when workflow class is instantiated.java.lang.ObjectnewCallbackThread(java.lang.Runnable runnable, java.lang.String name)Intercepts creation of a workflow callback threadjava.lang.ObjectnewWorkflowMethodThread(java.lang.Runnable runnable, java.lang.String name)Intercepts creation of the workflow main method threadvoidvalidateUpdate(WorkflowInboundCallsInterceptor.UpdateInput input)Called 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, wait
-
Methods inherited from interface io.temporal.common.interceptors.WorkflowInboundCallsInterceptor
execute
-
-
-
-
Method Detail
-
init
public void init(WorkflowOutboundCallsInterceptor outboundCalls)
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)}.
- Specified by:
initin interfaceWorkflowInboundCallsInterceptor- Parameters:
outboundCalls- an existing interceptor instance to be proxied by the interceptor created inside this method- See Also:
for the definition of "next"
-
handleSignal
public void handleSignal(WorkflowInboundCallsInterceptor.SignalInput input)
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
public void validateUpdate(WorkflowInboundCallsInterceptor.UpdateInput input)
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
@Nonnull public java.lang.Object newWorkflowMethodThread(java.lang.Runnable runnable, java.lang.String name)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
@Nonnull public java.lang.Object newCallbackThread(java.lang.Runnable runnable, java.lang.String name)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.
-
-