Reference·JavaScript · @sascom/jsclientJavaScript Task
Class in @sascom/jsclient.
API catalogue · @sascom/jsclient · Class
Members#
constructor#
public readonly id: string
request#
public readonly request: unknown
taskName#
public readonly taskName: string
addStream#
public addStream(name: string, file: unknown): void
Parameters#
| Name |
Type |
Description |
name |
string |
|
file |
unknown |
|
detailsUpdate#
public detailsUpdate(detailsUpdateCallback: (details: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
detailsUpdateCallback |
(details: unknown) => void |
|
error#
public error(errorCallback: (error: unknown, response: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
errorCallback |
(error: unknown, response: unknown) => void |
|
exec#
execAsPromise#
public execAsPromise(returnResponse?: boolean): Promise<unknown>
Parameters#
| Name |
Type |
Description |
returnResponse |
boolean |
true: resolve with the whole response instead of its result |
live#
public live(key?: string): Task
A never-finishing subscription: issued again (new id, same input and handlers) after every reconnect.
key: for a subscription the server allows once per session; a later live task with the same key replaces it.
Parameters#
| Name |
Type |
Description |
key |
string |
|
log#
public log(levels: (string)[], logCallback: (level: string, log: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
levels |
(string)[] |
|
logCallback |
(level: string, log: unknown) => void |
|
metricDefinitionUpdate#
public metricDefinitionUpdate(keys: (string)[], metricDefinitinUpdateCallback: (metricDefinition: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
keys |
(string)[] |
|
metricDefinitinUpdateCallback |
(metricDefinition: unknown) => void |
|
metricUpdate#
public metricUpdate(keys: (string)[], metricUpdateCallback: (metricUpdate: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
keys |
(string)[] |
|
metricUpdateCallback |
(metricUpdate: unknown) => void |
|
newBinaryData#
public newBinaryData(topicIds: (string)[], dataListener: (data: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
topicIds |
(string)[] |
|
dataListener |
(data: unknown) => void |
|
newData#
public newData(topicIds: (string)[], dataListener: (data: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
topicIds |
(string)[] |
|
dataListener |
(data: unknown) => void |
|
progress#
public progress(progressCallback: (label: string, progress: number) => void): Task
Parameters#
| Name |
Type |
Description |
progressCallback |
(label: string, progress: number) => void |
|
reissued#
public reissued(callback: (task: Task) => void): Task
Called just before a live task is issued again: clear what the previous snapshot filled.
Parameters#
| Name |
Type |
Description |
callback |
(task: Task) => void |
|
send#
public send(topicId: string, message: unknown): void
Parameters#
| Name |
Type |
Description |
topicId |
string |
|
message |
unknown |
|
setNodeId#
public setNodeId(nodeId: string): Task
Parameters#
| Name |
Type |
Description |
nodeId |
string |
|
setTimeOut#
public setTimeOut(value: number, unit: string): Task
Parameters#
| Name |
Type |
Description |
value |
number |
|
unit |
string |
|
setUi#
public setUi(ui: string | null): Task
Names the part of the UI a person asked this from, sent as the request's ui (at most 40 of a-z 0-9 . -); only for a call a person started, never the application's own.
Parameters#
| Name |
Type |
Description |
ui |
string | null |
|
statusChange#
public statusChange(statusses: (string)[], statusChangeCallback: (status: string) => void): Task
Parameters#
| Name |
Type |
Description |
statusses |
(string)[] |
|
statusChangeCallback |
(status: string) => void |
|
success#
public success(successCallback: (result: unknown, fullresponse: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
successCallback |
(result: unknown, fullresponse: unknown) => void |
|
taskInfo#
public taskInfo(taskInfoCallback: (taskInfo: unknown) => void): Task
Parameters#
| Name |
Type |
Description |
taskInfoCallback |
(taskInfo: unknown) => void |
|
terminate#