Package com.qtsurfer.api.sdk.internal
Class BacktestOutcomes
java.lang.Object
com.qtsurfer.api.sdk.internal.BacktestOutcomes
Reads an execute-result response as one of the four answers a standalone
read can get.
The status is normalized rather than switched on raw, so this classifies a run by exactly the rule the poll loop stops on — one vocabulary for "what does this status mean", not two that can drift apart.
That also makes the null-safety line up on its own.
StatusNormalizer.normalize(java.lang.Object) maps a missing status to
IN_PROGRESS, which is the one variant that tolerates a null
state, so a body-less response cannot reach a terminal variant and trip its
null check.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BacktestOutcomeof(com.qtsurfer.api.client.model.BacktestJobResult response) Classify an execute-result response.
-
Method Details
-
of
Classify an execute-result response.- Parameters:
response- the api-client response, ornullwhen the platform answered a known job without a body- Returns:
- the answer the response describes
-