Skip to main content

Class: Callback

v1.Link.Callback

A link to a worker callback attached to an execution. An execution (e.g. standalone Nexus operation) can have multiple callbacks attached, and will be differentiated by the request_id used when the callback is invoked.

Properties

componentPath

componentPath: string[]

In most cases, the Execution is sufficient to identify the callback's source. But the callback could have been attached some child component of that execution. e.g. a workflow update. The component path describes the unique component as applicable, typically ending with a unique ID. e.g. ["Update", $workflowUpdateId ]


execution

Optional execution: null | $Properties

Callback execution.


namespace

namespace: string

Callback namespace.


requestId

requestId: string

Server-generate request ID sent when the callback was dispatched.

Methods

toJSON

toJSON(): Object

Converts this Callback to JSON.

Returns

Object

JSON object


create

create(properties?): Callback & $Properties

Creates a new Callback instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

Callback & $Properties

Callback instance

create(properties?): Callback

Parameters

NameType
properties?$Properties

Returns

Callback


decode

decode(reader, length?): Callback & $Properties

Decodes a Callback message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

Callback & $Properties

Callback

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): Callback & $Properties

Decodes a Callback message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Callback & $Properties

Callback

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified Callback message. Does not implicitly temporal.api.common.v1.Link.Callback.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesCallback message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified Callback message, length delimited. Does not implicitly temporal.api.common.v1.Link.Callback.verify|verify messages.

Parameters

NameTypeDescription
message$PropertiesCallback message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): Callback

Creates a Callback message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Callback

Callback


toObject

toObject(message, options?): Object

Creates a plain object from a Callback message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageCallbackCallback
options?IConversionOptionsConversion options

Returns

Object

Plain object