Interface RunStreamEvent.Visitor
-
- All Implemented Interfaces:
public interface RunStreamEvent.Visitor<T extends Object>
An interface that defines how to map each variant of RunStreamEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract T
visitThreadRunCreated(RunStreamEvent.ThreadRunCreated threadRunCreated)
Occurs when a new run is created. abstract T
visitThreadRunQueued(RunStreamEvent.ThreadRunQueued threadRunQueued)
Occurs when a run moves to a queued
status.abstract T
visitThreadRunInProgress(RunStreamEvent.ThreadRunInProgress threadRunInProgress)
Occurs when a run moves to an in_progress
status.abstract T
visitThreadRunRequiresAction(RunStreamEvent.ThreadRunRequiresAction threadRunRequiresAction)
Occurs when a run moves to a requires_action
status.abstract T
visitThreadRunCompleted(RunStreamEvent.ThreadRunCompleted threadRunCompleted)
Occurs when a run is completed. abstract T
visitThreadRunIncomplete(RunStreamEvent.ThreadRunIncomplete threadRunIncomplete)
Occurs when a run ends with status incomplete
.abstract T
visitThreadRunFailed(RunStreamEvent.ThreadRunFailed threadRunFailed)
Occurs when a run fails. abstract T
visitThreadRunCancelling(RunStreamEvent.ThreadRunCancelling threadRunCancelling)
Occurs when a run moves to a cancelling
status.abstract T
visitThreadRunCancelled(RunStreamEvent.ThreadRunCancelled threadRunCancelled)
Occurs when a run is cancelled. abstract T
visitThreadRunExpired(RunStreamEvent.ThreadRunExpired threadRunExpired)
Occurs when a run expires. T
unknown(JsonValue json)
Maps an unknown variant of RunStreamEvent to a value of type T. -
-
Method Detail
-
visitThreadRunCreated
abstract T visitThreadRunCreated(RunStreamEvent.ThreadRunCreated threadRunCreated)
Occurs when a new run is created.
-
visitThreadRunQueued
abstract T visitThreadRunQueued(RunStreamEvent.ThreadRunQueued threadRunQueued)
Occurs when a run moves to a
queued
status.
-
visitThreadRunInProgress
abstract T visitThreadRunInProgress(RunStreamEvent.ThreadRunInProgress threadRunInProgress)
Occurs when a run moves to an
in_progress
status.
-
visitThreadRunRequiresAction
abstract T visitThreadRunRequiresAction(RunStreamEvent.ThreadRunRequiresAction threadRunRequiresAction)
Occurs when a run moves to a
requires_action
status.
-
visitThreadRunCompleted
abstract T visitThreadRunCompleted(RunStreamEvent.ThreadRunCompleted threadRunCompleted)
Occurs when a run is completed.
-
visitThreadRunIncomplete
abstract T visitThreadRunIncomplete(RunStreamEvent.ThreadRunIncomplete threadRunIncomplete)
Occurs when a run ends with status
incomplete
.
-
visitThreadRunFailed
abstract T visitThreadRunFailed(RunStreamEvent.ThreadRunFailed threadRunFailed)
Occurs when a run fails.
-
visitThreadRunCancelling
abstract T visitThreadRunCancelling(RunStreamEvent.ThreadRunCancelling threadRunCancelling)
Occurs when a run moves to a
cancelling
status.
-
visitThreadRunCancelled
abstract T visitThreadRunCancelled(RunStreamEvent.ThreadRunCancelled threadRunCancelled)
Occurs when a run is cancelled.
-
visitThreadRunExpired
abstract T visitThreadRunExpired(RunStreamEvent.ThreadRunExpired threadRunExpired)
Occurs when a run expires.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of RunStreamEvent to a value of type T.
An instance of RunStreamEvent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-