Class Callback.Types.NexusHandler
- Namespace
- Temporalio.Api.Common.V1
- Assembly
- Temporalio.dll
NexusHandler callbacks are requests to invoke a specific shape of Nexus operation on a Temporal worker. The specified Nexus operation must have the following:
- Input: temporal.api.notificationservice.v1.OnCompleteRequest
- Output: temporal.api.notificationservice.v1.OnCompleteResponse
The targeted Nexus service must be registered within the same namespace as the source operation the callback is attached to. (While Nexus allows for cross-namespace operations, NexusHandler callbacks are strictly caller-side.)
NexusHandler callbacks are only supported for certain types of operations, e.g. standalone Nexus operations. Attempting to attach a Worker callback for an unsupported operation will result in an INVALID_ARGUMENT error from the server.
public sealed class Callback.Types.NexusHandler : IMessage<Callback.Types.NexusHandler>, IEquatable<Callback.Types.NexusHandler>, IDeepCloneable<Callback.Types.NexusHandler>, IBufferMessage, IMessage
- Inheritance
-
Callback.Types.NexusHandler
- Implements
-
IBufferMessageIMessage
- Inherited Members
Constructors
NexusHandler()
public NexusHandler()
NexusHandler(NexusHandler)
public NexusHandler(Callback.Types.NexusHandler other)
Parameters
otherCallback.Types.NexusHandler
Fields
OperationFieldNumber
Field number for the "operation" field.
public const int OperationFieldNumber = 3
Field Value
ServiceFieldNumber
Field number for the "service" field.
public const int ServiceFieldNumber = 2
Field Value
SourceContextFieldNumber
Field number for the "source_context" field.
public const int SourceContextFieldNumber = 4
Field Value
TaskQueueNameFieldNumber
Field number for the "task_queue_name" field.
public const int TaskQueueNameFieldNumber = 1
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Operation
Target operation, e.g. "DeliverAsWebhook".
public string Operation { get; set; }
Property Value
Parser
public static MessageParser<Callback.Types.NexusHandler> Parser { get; }
Property Value
- MessageParser<Callback.Types.NexusHandler>
Service
Target Nexus service, e.g. "HTTPAdapter".
public string Service { get; set; }
Property Value
SourceContext
Arbitrary user-supplied data from the source operation's callsite. (As applicable, not all operations support attaching context data.)
There are restrictions on the maxium payload size a single callback can carry, as well as the total sum of all source context payloads attached to an execution. See dynamic configuration: "callback.nexusHandler.sourceContext.maxSize", "callback.nexusHandler.sourceContext.aggregateMaxSize".
public Payload SourceContext { get; set; }
Property Value
TaskQueueName
Nexus task queue the Temporal worker is listening on.
NOTE: This is not a temporal.api.taskqueue.v1.TaskQueue to avoid a circular dependency.
public string TaskQueueName { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public Callback.Types.NexusHandler Clone()
Returns
- Callback.Types.NexusHandler
A deep clone of this object.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
Equals(NexusHandler)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Callback.Types.NexusHandler other)
Parameters
otherCallback.Types.NexusHandlerAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(NexusHandler)
Merges the given message into this one.
public void MergeFrom(Callback.Types.NexusHandler other)
Parameters
otherCallback.Types.NexusHandler
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.