-
public class FetchStateUsed by NetworkFetcher to encapsulate the state of one network fetch.
Implementations can subclass this to store additional fetch-scoped fields.
-
-
Constructor Summary
Constructors Constructor Description FetchState(Consumer<EncodedImage> consumer, ProducerContext context)
-
Method Summary
Modifier and Type Method Description Consumer<EncodedImage>getConsumer()ProducerContextgetContext()StringgetId()ProducerListener2getListener()UrigetUri()longgetLastIntermediateResultTimeMs()voidsetLastIntermediateResultTimeMs(long lastIntermediateResultTimeMs)intgetOnNewResultStatusFlags()voidsetOnNewResultStatusFlags(int onNewResultStatusFlags)EXPERIMENTAL: Allows the fetcher to set extra status flags to be included in calls to . BytesRangegetResponseBytesRange()voidsetResponseBytesRange(@Nullable() BytesRange bytesRange)EXPERIMENTAL: Allows the fetcher to identify that the reponse is for an imcomplete portion ofthe whole image by defining the range of bytes being provided. -
-
Constructor Detail
-
FetchState
FetchState(Consumer<EncodedImage> consumer, ProducerContext context)
-
-
Method Detail
-
getConsumer
Consumer<EncodedImage> getConsumer()
-
getContext
ProducerContext getContext()
-
getListener
ProducerListener2 getListener()
-
getLastIntermediateResultTimeMs
long getLastIntermediateResultTimeMs()
-
setLastIntermediateResultTimeMs
void setLastIntermediateResultTimeMs(long lastIntermediateResultTimeMs)
-
getOnNewResultStatusFlags
int getOnNewResultStatusFlags()
-
setOnNewResultStatusFlags
void setOnNewResultStatusFlags(int onNewResultStatusFlags)
-
getResponseBytesRange
@Nullable() BytesRange getResponseBytesRange()
-
setResponseBytesRange
void setResponseBytesRange(@Nullable() BytesRange bytesRange)
EXPERIMENTAL: Allows the fetcher to identify that the reponse is for an imcomplete portion ofthe whole image by defining the range of bytes being provided.
-
-
-
-