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 insideDynamicSyncWorkflowDefinition
andPOJOWorkflowImplementationFactory
Root
WorkflowInboundCallsInterceptor
is an interceptor that should be at the end of theWorkflowInboundCallsInterceptor
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.WorkflowInput, WorkflowInboundCallsInterceptor.WorkflowOutput
-
-
Field Summary
Fields Modifier and Type Field Description protected io.temporal.internal.sync.SyncWorkflowContext
workflowContext
-
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.QueryOutput
handleQuery(WorkflowInboundCallsInterceptor.QueryInput input)
Called when a workflow is queried.void
handleSignal(WorkflowInboundCallsInterceptor.SignalInput input)
Called when signal is delivered to a workflow execution.void
init(WorkflowOutboundCallsInterceptor outboundCalls)
Called when workflow class is instantiated.java.lang.Object
newCallbackThread(java.lang.Runnable runnable, java.lang.String name)
Intercepts creation of a workflow callback threadjava.lang.Object
newWorkflowMethodThread(java.lang.Runnable runnable, java.lang.String name)
Intercepts creation of the workflow main method thread-
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:WorkflowInboundCallsInterceptor
Called when workflow class is instantiated. May create aWorkflowOutboundCallsInterceptor
instance. 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:
init
in 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:WorkflowInboundCallsInterceptor
Called when signal is delivered to a workflow execution.- Specified by:
handleSignal
in interfaceWorkflowInboundCallsInterceptor
-
handleQuery
public WorkflowInboundCallsInterceptor.QueryOutput handleQuery(WorkflowInboundCallsInterceptor.QueryInput input)
Description copied from interface:WorkflowInboundCallsInterceptor
Called when a workflow is queried.- Specified by:
handleQuery
in interfaceWorkflowInboundCallsInterceptor
-
newWorkflowMethodThread
@Nonnull public java.lang.Object newWorkflowMethodThread(java.lang.Runnable runnable, java.lang.String name)
Description copied from interface:WorkflowInboundCallsInterceptor
Intercepts creation of the workflow main method thread- Specified by:
newWorkflowMethodThread
in 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:WorkflowInboundCallsInterceptor
Intercepts creation of a workflow callback thread- Specified by:
newCallbackThread
in 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.
-
-