Class NexusSerializationContext
- All Implemented Interfaces:
SerializationContext
SerializationContext for Nexus operation payloads, identifying the Nexus endpoint,
service, and resolved operation the payload belongs to.
This context is used for payloads exchanged between a Nexus caller and handler: operation inputs, results, and failures. When a handler starts a workflow or standalone activity, or sends a workflow update, to back an operation, whatever it returns to the caller, such as its result or failure, is serialized with this context too, so the caller can decode it. Everything else keeps the workflow's or activity's own context. This requires a server that propagates the context.
To complete such an activity asynchronously, store the context from ActivityInfo.getNexusSerializationContext() with the task token and pass it
to ActivityCompletionClient.withContext(NexusSerializationContext).
Some payloads, such as failures and payloads from older servers, may be serialized without
this context. Context-dependent encodings, including in a FailureConverter, should be
self-describing, and decoders should accept payloads encoded without a context.
-
Constructor Details
-
NexusSerializationContext
-
-
Method Details
-
getEndpoint
- Returns:
- the Nexus endpoint name
-
getService
- Returns:
- the Nexus service name
-
getOperation
- Returns:
- the resolved Nexus operation name
-
equals
-
hashCode
-
toString
-