Class LinkConverter
java.lang.Object
io.temporal.internal.common.LinkConverter
Converts between
Link (used on history events and RPCs) and Link (the Nexus wire form: a URL plus a type string).
The following link types are supported, each with a fixed URL shape:
WorkflowEvent temporal:///namespaces/{ns}/workflows/{workflowId}/{runId}/history
Workflow temporal:///namespaces/{ns}/workflows/{workflowId}/{runId}
NexusOperation temporal:///namespaces/{ns}/nexus-operations/{operationId}/{runId}/details
Activity temporal:///namespaces/{ns}/activities/{activityId}/{runId}/details
Callback temporal:///namespaces/{ns}/{executionType}/{businessId}/{runId}/callbacks/{requestId}
Whoever decodes one of these URLs — the receiving server, or this class when a link arrives
here — applies standard URL semantics: path segments are percent-decoded and query values are
form-decoded. The two rules differ on +, so the codecs here are deliberately asymmetric —
see encodePathSegment(java.lang.String) and decodeQuery(java.lang.String).
Every method returns null rather than throwing when a link is malformed. Links are
decorative metadata attached to a Nexus call, so a bad one must never fail the call carrying it.
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.temporal.api.nexus.v1.LinkactivityToNexusLink(io.temporal.api.common.v1.Link.Activity activity) static io.temporal.api.nexus.v1.LinkcallbackToNexusLink(io.temporal.api.common.v1.Link.Callback cb) static io.temporal.api.nexus.v1.LinklinkToNexusLink(io.temporal.api.common.v1.Link commonLink) Dispatches on the oneof variant ofcommonLink.static io.temporal.api.common.v1.LinknexusLinkToActivity(io.temporal.api.nexus.v1.Link nexusLink) static io.temporal.api.common.v1.LinknexusLinkToCallback(io.temporal.api.nexus.v1.Link nexusLink) static io.temporal.api.common.v1.LinknexusLinkToLink(io.temporal.api.nexus.v1.Link nexusLink) Dispatches onLink.getType().static io.temporal.api.common.v1.LinknexusLinkToNexusOperation(io.temporal.api.nexus.v1.Link nexusLink) static io.temporal.api.common.v1.LinknexusLinkToWorkflowEvent(io.temporal.api.nexus.v1.Link nexusLink) static io.temporal.api.common.v1.LinknexusLinkToWorkflowLink(io.temporal.api.nexus.v1.Link nexusLink) static io.temporal.api.nexus.v1.LinknexusOperationToNexusLink(io.temporal.api.common.v1.Link.NexusOperation no) static io.temporal.api.nexus.v1.LinkworkflowEventToNexusLink(io.temporal.api.common.v1.Link.WorkflowEvent we) static io.temporal.api.nexus.v1.LinkworkflowLinkToNexusLink(io.temporal.api.common.v1.Link.Workflow w)
-
Method Details
-
linkToNexusLink
@Nullable public static io.temporal.api.nexus.v1.Link linkToNexusLink(io.temporal.api.common.v1.Link commonLink) Dispatches on the oneof variant ofcommonLink. Returns null if no variant is set. -
workflowEventToNexusLink
public static io.temporal.api.nexus.v1.Link workflowEventToNexusLink(io.temporal.api.common.v1.Link.WorkflowEvent we) -
workflowLinkToNexusLink
public static io.temporal.api.nexus.v1.Link workflowLinkToNexusLink(io.temporal.api.common.v1.Link.Workflow w) -
nexusOperationToNexusLink
public static io.temporal.api.nexus.v1.Link nexusOperationToNexusLink(io.temporal.api.common.v1.Link.NexusOperation no) -
activityToNexusLink
public static io.temporal.api.nexus.v1.Link activityToNexusLink(io.temporal.api.common.v1.Link.Activity activity) -
callbackToNexusLink
@Nullable public static io.temporal.api.nexus.v1.Link callbackToNexusLink(io.temporal.api.common.v1.Link.Callback cb) -
nexusLinkToLink
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToLink(io.temporal.api.nexus.v1.Link nexusLink) Dispatches onLink.getType(). -
nexusLinkToWorkflowEvent
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToWorkflowEvent(io.temporal.api.nexus.v1.Link nexusLink) -
nexusLinkToWorkflowLink
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToWorkflowLink(io.temporal.api.nexus.v1.Link nexusLink) -
nexusLinkToNexusOperation
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToNexusOperation(io.temporal.api.nexus.v1.Link nexusLink) -
nexusLinkToActivity
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToActivity(io.temporal.api.nexus.v1.Link nexusLink) -
nexusLinkToCallback
@Nullable public static io.temporal.api.common.v1.Link nexusLinkToCallback(io.temporal.api.nexus.v1.Link nexusLink) Inverse ofcallbackToNexusLink(io.temporal.api.common.v1.Link.Callback). A missing component path decodes to an empty one.
-