Class: NexusTask
Represents a NexusTask.
Implements
Constructors
constructor
• new NexusTask(properties?
): NexusTask
Constructs a new NexusTask.
Parameters
Name | Type | Description |
---|---|---|
properties? | INexusTask | Properties to set |
Returns
Properties
cancelTask
• Optional
cancelTask: null
| ICancelNexusTask
A request by Core to notify an in-progress operation handler that it should cancel. This
is distinct from a CancelOperationRequest
from the server, which results from the user
requesting the cancellation of an operation. Handling this variant should result in
something like cancelling a cancellation token given to the user's operation handler.
These do not count as a separate task for the purposes of completing all issued tasks, but rather count as a sort of modification to the already-issued task which is being cancelled.
EX: Core knows the nexus operation has timed out, and it does not make sense for the user's operation handler to continue doing work.
Implementation of
task
• Optional
task: null
| IPollNexusTaskQueueResponse
A nexus task from server
Implementation of
variant
• Optional
variant: "task"
| "cancelTask"
NexusTask variant.
Methods
toJSON
▸ toJSON(): Object
Converts this NexusTask to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): NexusTask
Creates a new NexusTask instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | INexusTask | Properties to set |
Returns
NexusTask instance
decode
▸ decode(reader
, length?
): NexusTask
Decodes a NexusTask message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
NexusTask
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): NexusTask
Decodes a NexusTask message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
NexusTask
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 NexusTask message. Does not implicitly coresdk.nexus.NexusTask.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | INexusTask | NexusTask message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified NexusTask message, length delimited. Does not implicitly coresdk.nexus.NexusTask.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | INexusTask | NexusTask message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): NexusTask
Creates a NexusTask message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
NexusTask
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for NexusTask
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message
, options?
): Object
Creates a plain object from a NexusTask message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | NexusTask | NexusTask |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object