Package com.amazonaws.event
Class ProgressTracker
- java.lang.Object
-
- com.amazonaws.event.SyncProgressListener
-
- com.amazonaws.event.ProgressTracker
-
- All Implemented Interfaces:
DeliveryMode
,ProgressListener
public class ProgressTracker extends SyncProgressListener
Default implementation for progress tracking.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.amazonaws.event.DeliveryMode
DeliveryMode.Check
-
Nested classes/interfaces inherited from interface com.amazonaws.event.ProgressListener
ProgressListener.ExceptionReporter, ProgressListener.NoOpProgressListener
-
-
Field Summary
Fields Modifier and Type Field Description static ProgressTracker
NOOP
-
Constructor Summary
Constructors Constructor Description ProgressTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Progress
getProgress()
void
progressChanged(ProgressEvent progressEvent)
Called when progress has changed, such as additional bytes transferred, transfer failed, etc.-
Methods inherited from class com.amazonaws.event.SyncProgressListener
isSyncCallSafe
-
-
-
-
Field Detail
-
NOOP
public static final ProgressTracker NOOP
-
-
Method Detail
-
progressChanged
public void progressChanged(ProgressEvent progressEvent)
Description copied from interface:ProgressListener
Called when progress has changed, such as additional bytes transferred, transfer failed, etc. The execution of the callback of this listener is managed bySDKProgressPublisher
. Implementation of this interface should never block.If the implementation follows the best practice and doesn't block, it should then extends from
SyncProgressListener
.Note any exception thrown by the listener will get ignored. Should there be need to capture any such exception, you may consider wrapping the listener with
ProgressListener.ExceptionReporter.wrap(ProgressListener)
.- Parameters:
progressEvent
- The event describing the progress change.- See Also:
SDKProgressPublisher
,ProgressListener.ExceptionReporter
-
getProgress
public Progress getProgress()
-
-