Class InternalUtils
java.lang.Object
io.temporal.internal.common.InternalUtils
Utility functions shared by the implementation code.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic io.temporal.api.common.v1.CallbackbuildNexusCallback(String callbackUrl, Map<String, String> callbackHeaders, String operationToken, List<io.temporal.api.common.v1.Link> protoLinks) Builds aCallbackfor use as a Nexus completion callback.static voidcheckMethodName(io.nexusrpc.handler.ServiceImplInstance instance) static voidcheckMethodName(POJOActivityMethodMetadata methodMetadata) static voidcheckMethodName(POJOWorkflowMethodMetadata methodMetadata) Check the method name for reserved prefixes or names.static NexusWorkflowStartercreateNexusBoundStub(WorkflowStub stub, NexusStartWorkflowRequest request) Creates a new stub that is bound to the same workflow as the given stub, but with the Nexus callback URL and headers set.static io.temporal.api.taskqueue.v1.TaskQueuecreateNormalTaskQueue(String taskQueueName) static io.temporal.api.taskqueue.v1.TaskQueuecreateStickyTaskQueue(String stickyTaskQueueName, String normalTaskQueueName) static ObjectgetValueOrDefault(Object value, Class<?> valueClass) static booleanReturns true if the given name is in the__temporal_workflow_stream_sub-namespace, which is reserved for the workflow streams contrib module and permitted for signal, update, and query handler registration.
-
Field Details
-
TEMPORAL_RESERVED_PREFIX
- See Also:
-
WORKFLOW_STREAM_RESERVED_PREFIX
- See Also:
-
-
Method Details
-
createStickyTaskQueue
-
createNormalTaskQueue
-
getValueOrDefault
-
createNexusBoundStub
public static NexusWorkflowStarter createNexusBoundStub(WorkflowStub stub, NexusStartWorkflowRequest request) Creates a new stub that is bound to the same workflow as the given stub, but with the Nexus callback URL and headers set.- Parameters:
stub- the stub to create a new stub fromrequest- the request containing the Nexus callback URL and headers- Returns:
- a new stub bound to the same workflow as the given stub, but with the Nexus callback URL and headers set
-
isWorkflowStreamReservedName
Returns true if the given name is in the__temporal_workflow_stream_sub-namespace, which is reserved for the workflow streams contrib module and permitted for signal, update, and query handler registration. -
buildNexusCallback
public static io.temporal.api.common.v1.Callback buildNexusCallback(String callbackUrl, Map<String, String> callbackHeaders, String operationToken, List<io.temporal.api.common.v1.Link> protoLinks) Builds aCallbackfor use as a Nexus completion callback. Injects both the legacyNexus-Operation-Idand the newerNexus-Operation-Tokenheaders (case-insensitive lookup) when not already present so the server can fabricate operation-started events if the completion is received before the response to a StartOperation request.Shared by the workflow start path (
createNexusBoundStub(io.temporal.client.WorkflowStub, io.temporal.internal.client.NexusStartWorkflowRequest)) and the activity start path (RootActivityClientInvoker.startActivity). The dualOPERATION_ID+OPERATION_TOKENheaders must be injected before the start RPC is issued. -
checkMethodName
Check the method name for reserved prefixes or names. -
checkMethodName
-
checkMethodName
public static void checkMethodName(io.nexusrpc.handler.ServiceImplInstance instance)
-