Package io.temporal.common.interceptors
Interface WorkflowInboundCallsInterceptor
-
- All Known Implementing Classes:
BaseRootWorkflowInboundCallsInterceptor,WorkflowInboundCallsInterceptorBase
public interface WorkflowInboundCallsInterceptorIntercepts inbound calls to the workflow execution on the worker side.An instance should be created in
WorkerInterceptor.interceptWorkflow(WorkflowInboundCallsInterceptor).The calls to this interceptor are executed under workflow context, all the rules and restrictions on the workflow code apply. See
io.temporal.workflow.Prefer extending
WorkflowInboundCallsInterceptorBaseand overriding only the methods you need instead of implementing this interface directly.WorkflowInboundCallsInterceptorBaseprovides correct default implementations to all the methods of this interface.The implementation must forward all the calls to
next, but it may change the input parameters.- See Also:
for a definition of "next"
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classWorkflowInboundCallsInterceptor.QueryInputstatic classWorkflowInboundCallsInterceptor.QueryOutputstatic classWorkflowInboundCallsInterceptor.SignalInputstatic classWorkflowInboundCallsInterceptor.UpdateInputstatic classWorkflowInboundCallsInterceptor.UpdateOutputstatic classWorkflowInboundCallsInterceptor.WorkflowInputstatic classWorkflowInboundCallsInterceptor.WorkflowOutput
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkflowInboundCallsInterceptor.WorkflowOutputexecute(WorkflowInboundCallsInterceptor.WorkflowInput input)Called when workflow main method is called.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.
-
-
-
Method Detail
-
init
void init(WorkflowOutboundCallsInterceptor outboundCalls)
Called 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)}.
- Parameters:
outboundCalls- an existing interceptor instance to be proxied by the interceptor created inside this method- See Also:
for the definition of "next"
-
execute
WorkflowInboundCallsInterceptor.WorkflowOutput execute(WorkflowInboundCallsInterceptor.WorkflowInput input)
Called when workflow main method is called.- Returns:
- result of the workflow execution.
-
handleSignal
void handleSignal(WorkflowInboundCallsInterceptor.SignalInput input)
Called when signal is delivered to a workflow execution.
-
handleQuery
WorkflowInboundCallsInterceptor.QueryOutput handleQuery(WorkflowInboundCallsInterceptor.QueryInput input)
Called when a workflow is queried.
-
validateUpdate
void validateUpdate(WorkflowInboundCallsInterceptor.UpdateInput input)
Called when update workflow execution request is delivered to a workflow execution, before the update is executed.
-
executeUpdate
WorkflowInboundCallsInterceptor.UpdateOutput executeUpdate(WorkflowInboundCallsInterceptor.UpdateInput input)
Called when update workflow execution request is delivered to a workflow execution, after passing the validator.
-
newWorkflowMethodThread
@Nonnull java.lang.Object newWorkflowMethodThread(java.lang.Runnable runnable, @Nullable java.lang.String name)Intercepts creation of the workflow main method thread- 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 java.lang.Object newCallbackThread(java.lang.Runnable runnable, @Nullable java.lang.String name)Intercepts creation of a workflow callback thread- 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.
-
-