Class ActivitySerializationContext
java.lang.Object
io.temporal.payload.context.ActivitySerializationContext
- All Implemented Interfaces:
HasWorkflowSerializationContext,SerializationContext
@Experimental
public class ActivitySerializationContext
extends Object
implements HasWorkflowSerializationContext
-
Constructor Details
-
ActivitySerializationContext
public ActivitySerializationContext(@Nonnull String namespace, @Nullable String workflowId, @Nullable String workflowType, @Nonnull String activityType, @Nonnull String activityTaskQueue, boolean local) - Parameters:
namespace- the activity's namespace; must not benullworkflowId- the workflow ID that scheduled the activity, ornullfor standalone activities (stored as an empty string)workflowType- the workflow type that scheduled the activity, ornullfor standalone activities (stored as an empty string)activityType- the activity type name; must not benullactivityTaskQueue- the task queue for this activity; must not benulllocal-trueif this is a local activity
-
ActivitySerializationContext
-
-
Method Details
-
getNamespace
- Specified by:
getNamespacein interfaceHasWorkflowSerializationContext- Returns:
- namespace the workflow execution belongs to
-
getWorkflowId
- Specified by:
getWorkflowIdin interfaceHasWorkflowSerializationContext- Returns:
- workflowId of the Workflow Execution the Serialization Target belongs to. If the Target
is a Workflow itself, this method will return the Target's Workflow ID (not the ID of the
parent workflow). Returns
nullfor standalone activities (not associated with a workflow).WARNING: When used in the context of a schedule workflow the workflowId may differ on serialization and deserialization.
-
getWorkflowType
-
getActivityType
-
getActivityTaskQueue
-
isLocal
public boolean isLocal()
-