Interface DataFetchProgressListener
-
- All Known Implementing Classes:
IdleDataFetchProgressListener
public interface DataFetchProgressListener
- Since:
- 4.0.0
- Author:
- Torsten Krause (tk at markenwerk dot net)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFailed(DataFetchException exception, Long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has failed.void
onFinished()
Indicates that the process of fetching bytes from anInputStream
has finished.void
onProgress(long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has progressed.void
onStarted()
Indicates that the process of fetching bytes from anInputStream
has started.void
onSuccedded(Long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has succeeded.
-
-
-
Method Detail
-
onStarted
void onStarted()
Indicates that the process of fetching bytes from anInputStream
has started.
-
onProgress
void onProgress(long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has progressed.The progress will only be reported if the
DataFetcher
is capable of monitoring the progress.- Parameters:
bytesFetched
- Total amount of bytes fetched so far.
-
onSuccedded
void onSuccedded(Long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has succeeded.- Parameters:
bytesFetched
- Total total amount of bytes fetched or null, if theDataFetcher
is not capable of monitoring the progress.
-
onFailed
void onFailed(DataFetchException exception, Long bytesFetched)
Indicates that the process of fetching bytes from anInputStream
has failed.- Parameters:
exception
- TheDataFetchException
that caused the process to fail. This is the sameDataFetchException
that is thrown in the failing method ofDataFetcher
that thisDataFetchProgressListener
has been given to.bytesFetched
- Total total amount of bytes fetched before the process failed or null, if theDataFetcher
is not capable of monitoring the progress.
-
onFinished
void onFinished()
Indicates that the process of fetching bytes from anInputStream
has finished.This method will be called after either
onSuccedded(Long)
oronFailed(DataFetchException, Long)
has been called.
-
-