Package com.amazonaws.event
Class ProgressEvent
java.lang.Object
com.amazonaws.event.ProgressEvent
- Direct Known Subclasses:
ProgressEvent
A progress event. Typically this is used to notify a chunk of bytes has been
transferred. Also used to notify other types of progress events such as a
transfer starting, or failing.
The legacy Amazon S3 progress event com.amazonaws.services.s3.model.ProgressEvent has been deprecated in favor of this new class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Deprecated.static final int
Deprecated.Replaced byProgressEventType.TRANSFER_COMPLETED_EVENT
static final int
Deprecated.Replaced byProgressEventType.TRANSFER_FAILED_EVENT
static final int
Deprecated.Replaced byProgressEventType.TRANSFER_PART_COMPLETED_EVENT
static final int
Deprecated.Replaced byProgressEventType.TRANSFER_PART_FAILED_EVENT
static final int
Deprecated.Replaced byProgressEventType.TRANSFER_PART_STARTED_EVENT
static final int
Deprecated.Replaced byProgressEventType.TRANSFER_PREPARING_EVENT
static final int
Deprecated.static final int
Deprecated.Replaced byProgressEventType.TRANSFER_STARTED_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionProgressEvent
(long bytes) Deprecated.ProgressEvent
(ProgressEventType eventType) Creates a ProgressEvent object with the specified event type.ProgressEvent
(ProgressEventType eventType, long bytes) Creates a ProgressEvent object. -
Method Summary
Modifier and TypeMethodDescriptionlong
getBytes()
Returns the number of bytes associated with the event.long
Convenient method to returns the number of bytes transferred in this event, or the number of bytes reset (or discarded) if negative.int
Deprecated.UsegetEventType()
instead.Returns the type of event this object represents.toString()
-
Field Details
-
PREPARING_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_PREPARING_EVENT
- See Also:
-
STARTED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_STARTED_EVENT
- See Also:
-
COMPLETED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_COMPLETED_EVENT
- See Also:
-
FAILED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_FAILED_EVENT
- See Also:
-
CANCELED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_CANCELED_EVENT
- See Also:
-
RESET_EVENT_CODE
Deprecated.- See Also:
-
PART_STARTED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_PART_STARTED_EVENT
- See Also:
-
PART_COMPLETED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_PART_COMPLETED_EVENT
- See Also:
-
PART_FAILED_EVENT_CODE
Deprecated.Replaced byProgressEventType.TRANSFER_PART_FAILED_EVENT
- See Also:
-
-
Constructor Details
-
ProgressEvent
Deprecated.Creates a BYTE_TRANSFER_EVENT with the specified bytesTransferred data. -
ProgressEvent
Creates a ProgressEvent object with the specified event type.- Parameters:
eventType
- Type of the progress event. This parameter must not be null.
-
ProgressEvent
Creates a ProgressEvent object.- Parameters:
eventType
- Type of the progress event. This parameter must not be null.bytes
- Number of bytes involved.
-
-
Method Details
-
getBytes
public long getBytes()Returns the number of bytes associated with the event. The number of bytes are not necessarily the same as the number of bytes transferred, and it's meaning depends on the specific event type. For example, the bytes of aProgressEventType.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. -
getBytesTransferred
public long getBytesTransferred()Convenient method to returns the number of bytes transferred in this event, or the number of bytes reset (or discarded) if negative. In particular, bytes of a content-length event is excluded. -
getEventCode
Deprecated.UsegetEventType()
instead.Returns the unique event code identifying the type of event this object represents.- Returns:
- The unique event code that identifies what type of specific type of event this object represents.
-
getEventType
Returns the type of event this object represents. This method never returns null.- Returns:
- The type of event this object represents.
-
toString
-
ProgressEventType.TRANSFER_CANCELED_EVENT