Package com.amazonaws.event
Interface ProgressListener
-
- All Known Implementing Classes:
LegacyS3ProgressListener
,ProgressListener.ExceptionReporter
,ProgressListener.NoOpProgressListener
,ProgressListenerChain
,ProgressListenerWithEventCodeVerification
,ProgressTracker
,SyncProgressListener
public interface ProgressListener
Listener interface for transfer progress events.This class could be used for both Amazon S3 and Amazon Glacier clients. The legacy Amazon S3 progress listener com.amazonaws.services.s3.model.ProgressListener has been deprecated in favor of this new class.
- See Also:
ProgressEvent
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ProgressListener.ExceptionReporter
A utility class for capturing and reporting the first exception thrown by a given progress listener.static class
ProgressListener.NoOpProgressListener
-
Field Summary
Fields Modifier and Type Field Description static ProgressListener
NOOP
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
progressChanged(ProgressEvent progressEvent)
Called when progress has changed, such as additional bytes transferred, transfer failed, etc.
-
-
-
Field Detail
-
NOOP
static final ProgressListener NOOP
-
-
Method Detail
-
progressChanged
void progressChanged(ProgressEvent progressEvent)
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
-
-