@Immutable public class ProgressEvent extends Object
The legacy Amazon S3 progress event software.amazon.awssdk.services.s3.model.ProgressEvent has been deprecated in favor of this new class.
| Modifier and Type | Field | Description |
|---|---|---|
static int |
CANCELED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_CANCELED_EVENT |
static int |
COMPLETED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_COMPLETED_EVENT |
static int |
FAILED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_FAILED_EVENT |
static int |
PART_COMPLETED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_PART_COMPLETED_EVENT |
static int |
PART_FAILED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_PART_FAILED_EVENT |
static int |
PART_STARTED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_PART_STARTED_EVENT |
static int |
PREPARING_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_PREPARING_EVENT |
static int |
RESET_EVENT_CODE |
Deprecated.
|
static int |
STARTED_EVENT_CODE |
Deprecated.
Replaced by
ProgressEventType.TRANSFER_STARTED_EVENT |
| Constructor | Description |
|---|---|
ProgressEvent(long bytes) |
Deprecated.
|
ProgressEvent(ProgressEventType eventType) |
Creates a ProgressEvent object with the specified event type.
|
ProgressEvent(ProgressEventType eventType,
long bytes) |
Creates a ProgressEvent object.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getBytes() |
Returns the number of bytes associated with the event.
|
long |
getBytesTransferred() |
Convenient method to returns the number of bytes transferred in this
event, or the number of bytes reset (or discarded) if negative.
|
int |
getEventCode() |
Deprecated.
Use
getEventType() instead. |
ProgressEventType |
getEventType() |
Returns the type of event this object represents.
|
String |
toString() |
@Deprecated public static final int PREPARING_EVENT_CODE
ProgressEventType.TRANSFER_PREPARING_EVENT@Deprecated public static final int STARTED_EVENT_CODE
ProgressEventType.TRANSFER_STARTED_EVENT@Deprecated public static final int COMPLETED_EVENT_CODE
ProgressEventType.TRANSFER_COMPLETED_EVENT@Deprecated public static final int FAILED_EVENT_CODE
ProgressEventType.TRANSFER_FAILED_EVENT@Deprecated public static final int CANCELED_EVENT_CODE
ProgressEventType.TRANSFER_CANCELED_EVENT@Deprecated public static final int RESET_EVENT_CODE
ProgressEventType.HTTP_REQUEST_CONTENT_RESET_EVENT@Deprecated public static final int PART_STARTED_EVENT_CODE
ProgressEventType.TRANSFER_PART_STARTED_EVENT@Deprecated public static final int PART_COMPLETED_EVENT_CODE
ProgressEventType.TRANSFER_PART_COMPLETED_EVENT@Deprecated public static final int PART_FAILED_EVENT_CODE
ProgressEventType.TRANSFER_PART_FAILED_EVENT@Deprecated public ProgressEvent(long bytes)
public ProgressEvent(ProgressEventType eventType)
eventType - Type of the progress event. This parameter must not be null.public ProgressEvent(ProgressEventType eventType, long bytes)
eventType - Type of the progress event. This parameter must not be null.bytes - Number of bytes involved.public long getBytes()
ProgressEventType.REQUEST_CONTENT_LENGTH_EVENT refers
to the expected number of bytes to be sent to AWS, not the actual number
of bytes that have been transferred.public long getBytesTransferred()
@Deprecated public int getEventCode()
getEventType() instead.public ProgressEventType getEventType()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.