public class ProgressListenerChain extends java.lang.Object implements ProgressListener
This class could be used for both Amazon S3 and Amazon Glacier clients. The legacy Amazon S3 progress listener chain com.amazonaws.services.s3.transfer.internal.ProgressListenerChain has been deprecated in favor of this new class.
Modifier and Type | Class and Description |
---|---|
static interface |
ProgressListenerChain.ProgressEventFilter
An interface that filters the incoming events before passing them into
the registered listeners.
|
Constructor and Description |
---|
ProgressListenerChain(ProgressListener... listeners)
Create a listener chain that directly passes all the progress events to
the specified listeners.
|
ProgressListenerChain(ProgressListenerChain.ProgressEventFilter progressEventFilter,
ProgressListener... listeners)
Create a listener chain with a ProgressEventFilter.
|
Modifier and Type | Method and Description |
---|---|
void |
addProgressListener(ProgressListener listener)
Adds the progress listener.
|
void |
progressChanged(ProgressEvent progressEvent)
Called when progress has changed, such as additional bytes transferred,
transfer failed, etc.
|
void |
removeProgressListener(ProgressListener listener)
Removes the progress listeners.
|
public ProgressListenerChain(ProgressListener... listeners)
listeners
- the progress listener.public ProgressListenerChain(ProgressListenerChain.ProgressEventFilter progressEventFilter, ProgressListener... listeners)
listeners
- the progress listener.progressEventFilter
- the progress event filter.public void addProgressListener(ProgressListener listener)
listener
- the progress listener.public void removeProgressListener(ProgressListener listener)
listener
- the progress listener.public void progressChanged(ProgressEvent progressEvent)
ProgressListener
ProgressListenerCallbackExecutor
class, which
maintains a single thread to sequentially execute all progressChanged
callbacks.progressChanged
in interface ProgressListener
progressEvent
- The event describing the progress change.ProgressListenerCallbackExecutor
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.