Class IdleDataFetchProgressListener
- java.lang.Object
-
- net.markenwerk.utils.data.fetcher.IdleDataFetchProgressListener
-
- All Implemented Interfaces:
DataFetchProgressListener
public class IdleDataFetchProgressListener extends Object implements DataFetchProgressListener
AnIdleDataFetchProgressListener
is aDataFetchProgressListener
with empty methods. It is intended a base implementation for customDataFetchProgressListener
implementations, that don't need to implement all methods.- Since:
- 4.0.0
- Author:
- Torsten Krause (tk at markenwerk dot net)
-
-
Constructor Summary
Constructors Constructor Description IdleDataFetchProgressListener()
-
Method Summary
All Methods Instance Methods Concrete 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
public void onStarted()
Description copied from interface:DataFetchProgressListener
Indicates that the process of fetching bytes from anInputStream
has started.- Specified by:
onStarted
in interfaceDataFetchProgressListener
-
onProgress
public void onProgress(long bytesFetched)
Description copied from interface:DataFetchProgressListener
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.- Specified by:
onProgress
in interfaceDataFetchProgressListener
- Parameters:
bytesFetched
- Total amount of bytes fetched so far.
-
onSuccedded
public void onSuccedded(Long bytesFetched)
Description copied from interface:DataFetchProgressListener
Indicates that the process of fetching bytes from anInputStream
has succeeded.- Specified by:
onSuccedded
in interfaceDataFetchProgressListener
- Parameters:
bytesFetched
- Total total amount of bytes fetched or null, if theDataFetcher
is not capable of monitoring the progress.
-
onFailed
public void onFailed(DataFetchException exception, Long bytesFetched)
Description copied from interface:DataFetchProgressListener
Indicates that the process of fetching bytes from anInputStream
has failed.- Specified by:
onFailed
in interfaceDataFetchProgressListener
- 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
public void onFinished()
Description copied from interface:DataFetchProgressListener
Indicates that the process of fetching bytes from anInputStream
has finished.This method will be called after either
DataFetchProgressListener.onSuccedded(Long)
orDataFetchProgressListener.onFailed(DataFetchException, Long)
has been called.- Specified by:
onFinished
in interfaceDataFetchProgressListener
-
-