Interface WorkflowOutboundCallsInterceptor
-
- All Known Implementing Classes:
WorkflowOutboundCallsInterceptorBase
public interface WorkflowOutboundCallsInterceptor
Can be used to intercept calls from to workflow code into the Temporal APIs.The calls to the interceptor are executed in the context of a workflow and must follow the same rules all the other workflow code follows.
Prefer extending
WorkflowOutboundCallsInterceptorBase
and overriding only the methods you need instead of implementing this interface directly.WorkflowOutboundCallsInterceptorBase
provides correct default implementations to all the methods of this interface.An instance may be created in
WorkflowInboundCallsInterceptor.init(WorkflowOutboundCallsInterceptor)
and set by passing it intoinit
method of thenext
WorkflowInboundCallsInterceptor
The implementation must forward all the calls to the outbound interceptor passed as aoutboundCalls
parameter to theinit
call.- See Also:
for the definition of "next" .
-
-
Nested Class Summary
-
Method Summary
-
-
-
Method Detail
-
executeActivity
<R> WorkflowOutboundCallsInterceptor.ActivityOutput<R> executeActivity(WorkflowOutboundCallsInterceptor.ActivityInput<R> input)
-
executeLocalActivity
<R> WorkflowOutboundCallsInterceptor.LocalActivityOutput<R> executeLocalActivity(WorkflowOutboundCallsInterceptor.LocalActivityInput<R> input)
-
executeChildWorkflow
<R> WorkflowOutboundCallsInterceptor.ChildWorkflowOutput<R> executeChildWorkflow(WorkflowOutboundCallsInterceptor.ChildWorkflowInput<R> input)
-
newRandom
java.util.Random newRandom()
-
signalExternalWorkflow
WorkflowOutboundCallsInterceptor.SignalExternalOutput signalExternalWorkflow(WorkflowOutboundCallsInterceptor.SignalExternalInput input)
-
cancelWorkflow
WorkflowOutboundCallsInterceptor.CancelWorkflowOutput cancelWorkflow(WorkflowOutboundCallsInterceptor.CancelWorkflowInput input)
-
sleep
void sleep(java.time.Duration duration)
-
await
boolean await(java.time.Duration timeout, java.lang.String reason, java.util.function.Supplier<java.lang.Boolean> unblockCondition)
-
await
void await(java.lang.String reason, java.util.function.Supplier<java.lang.Boolean> unblockCondition)
-
newTimer
Promise<java.lang.Void> newTimer(java.time.Duration duration)
-
sideEffect
<R> R sideEffect(java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, Functions.Func<R> func)
-
mutableSideEffect
<R> R mutableSideEffect(java.lang.String id, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.util.function.BiPredicate<R,R> updated, Functions.Func<R> func)
-
getVersion
int getVersion(java.lang.String changeId, int minSupported, int maxSupported)
-
continueAsNew
void continueAsNew(WorkflowOutboundCallsInterceptor.ContinueAsNewInput input)
-
registerQuery
void registerQuery(WorkflowOutboundCallsInterceptor.RegisterQueryInput input)
-
registerSignalHandlers
void registerSignalHandlers(WorkflowOutboundCallsInterceptor.RegisterSignalHandlersInput input)
-
registerUpdateHandlers
void registerUpdateHandlers(WorkflowOutboundCallsInterceptor.RegisterUpdateHandlersInput input)
-
registerDynamicSignalHandler
void registerDynamicSignalHandler(WorkflowOutboundCallsInterceptor.RegisterDynamicSignalHandlerInput handler)
-
registerDynamicQueryHandler
void registerDynamicQueryHandler(WorkflowOutboundCallsInterceptor.RegisterDynamicQueryHandlerInput input)
-
registerDynamicUpdateHandler
void registerDynamicUpdateHandler(WorkflowOutboundCallsInterceptor.RegisterDynamicUpdateHandlerInput input)
-
randomUUID
java.util.UUID randomUUID()
-
upsertSearchAttributes
void upsertSearchAttributes(java.util.Map<java.lang.String,?> searchAttributes)
-
upsertTypedSearchAttributes
void upsertTypedSearchAttributes(SearchAttributeUpdate<?>... searchAttributeUpdates)
-
newChildThread
java.lang.Object newChildThread(java.lang.Runnable runnable, boolean detached, java.lang.String name)
Intercepts creation of a workflow child thread.Please note, that "workflow child thread" and "child workflow" are different and independent concepts.
- Parameters:
runnable
- thread function to rundetached
- if this thread is detached from the parentCancellationScope
name
- name of the thread- Returns:
- created WorkflowThread
-
currentTimeMillis
long currentTimeMillis()
-
-