Called when a stream needs to be restarted, the implementation should generate a request that
will yield a new stream whose first response would come right after the last response received
by processResponse.
Parameter
Name
Description
originalRequest
RequestT
Returns
Type
Description
RequestT
processResponse(ResponseT response)
publicResponseTprocessResponse(ResponseTresponse)
Called by the ServerStreamingAttemptCallable when a response has been successfully
received. This method accomplishes two goals:
It allows the strategy implementation to update its internal state so that it can compose
the resume request
It allows the strategy to alter the incoming responses to adjust for after resume. For
example, if the responses are numbered sequentially from the start of the stream, upon
resume, the strategy could rewrite the messages to continue the sequence from where it
left off. Please note that all messages (even for the first attempt) will be passed
through this method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This webpage details the `SimpleStreamResumptionStrategy` class, which is the simplest implementation of a `StreamResumptionStrategy` for unstarted streams."],["The `SimpleStreamResumptionStrategy` class is a component of the Google API Client Library for Java, specifically within the `com.google.api.gax.retrying` package and is designed to handle retries and resumptions in streaming contexts."],["The latest version of the `SimpleStreamResumptionStrategy` class is 2.63.1, with a comprehensive list of prior versions ranging down to 2.7.1, all accessible via links to their respective documentation."],["Key methods of the `SimpleStreamResumptionStrategy` include `canResume()`, `createNew()`, `getResumeRequest(RequestT originalRequest)`, and `processResponse(ResponseT response)`, each serving specific functions in managing stream resumption and state."],["The `SimpleStreamResumptionStrategy` implements the `StreamResumptionStrategy` interface, managing the process of stream restart and adjusting responses after a stream has been resumed."]]],[]]