Class TaskEvent
java.lang.Object
com.alibaba.dashscope.transport.ws.TaskEvent
One inbound item on a
TaskChannel: a parsed task-protocol text event, a raw binary frame,
the socket-closed signal, or a transport-level failure. Binary frames carry no header, hence no
task id (audio design §7: ownership is claimed, not parsed).-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionBINARY only: zero-copy view of the frame.intTEXT only:header.error_code; set on task-failed.TEXT only:header.error_message; set on task-failed.getEvent()TEXT only:header.event(task-started / result-generated / task-finished / ...).FAILURE only: the transport-level exception.getKind()com.fasterxml.jackson.databind.JsonNodeTEXT only: thepayloadnode (may be null).com.fasterxml.jackson.databind.JsonNodegetRaw()TEXT only: the full frame, header included.TEXT only:header.request_id, falling back toheader.task_id.TEXT only:header.task_id.
-
Method Details
-
getKind
-
getTaskId
TEXT only:header.task_id. -
getRequestId
TEXT only:header.request_id, falling back toheader.task_id. -
getEvent
TEXT only:header.event(task-started / result-generated / task-finished / ...). -
getErrorCode
TEXT only:header.error_code; set on task-failed. -
getErrorMessage
TEXT only:header.error_message; set on task-failed. -
getPayload
public com.fasterxml.jackson.databind.JsonNode getPayload()TEXT only: thepayloadnode (may be null). -
getRaw
public com.fasterxml.jackson.databind.JsonNode getRaw()TEXT only: the full frame, header included. -
getBinary
BINARY only: zero-copy view of the frame. -
getCloseCode
public int getCloseCode() -
getCloseReason
-
getFailure
FAILURE only: the transport-level exception.
-