com.amazonaws.event
Class ProgressEvent

java.lang.Object
  extended by com.amazonaws.event.ProgressEvent
Direct Known Subclasses:
ProgressEvent

public class ProgressEvent
extends java.lang.Object

Notification of a progress change on a transfer. Typically this means notice that another chunk of bytes was transferred, but it also signals other types of progress events such as a transfer starting, or failing.

This class could be used for both Amazon S3 and Amazon Glacier clients. The legacy Amazon S3 progress event com.amazonaws.services.s3.model.ProgressEvent has been deprecated in favor of this new class.


Field Summary
static int CANCELED_EVENT_CODE
           
static int COMPLETED_EVENT_CODE
           
static int FAILED_EVENT_CODE
           
static int PART_COMPLETED_EVENT_CODE
           
static int PART_FAILED_EVENT_CODE
           
static int PART_STARTED_EVENT_CODE
           
static int PREPARING_EVENT_CODE
           
static int RESET_EVENT_CODE
           
static int STARTED_EVENT_CODE
           
 
Constructor Summary
ProgressEvent(int eventCode, long bytesTransferred)
           
ProgressEvent(long bytesTransferred)
           
 
Method Summary
 long getBytesTransferred()
          Returns the number of bytes transferred since the last progress event.
 int getEventCode()
          Returns the unique event code identifying the type of event this object represents.
 void setBytesTransferred(long bytesTransferred)
          Sets the number of bytes transferred since the last progress event.
 void setEventCode(int eventType)
          Sets the unique event code identifying the type of event this object represents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREPARING_EVENT_CODE

public static final int PREPARING_EVENT_CODE
See Also:
Constant Field Values

STARTED_EVENT_CODE

public static final int STARTED_EVENT_CODE
See Also:
Constant Field Values

COMPLETED_EVENT_CODE

public static final int COMPLETED_EVENT_CODE
See Also:
Constant Field Values

FAILED_EVENT_CODE

public static final int FAILED_EVENT_CODE
See Also:
Constant Field Values

CANCELED_EVENT_CODE

public static final int CANCELED_EVENT_CODE
See Also:
Constant Field Values

RESET_EVENT_CODE

public static final int RESET_EVENT_CODE
See Also:
Constant Field Values

PART_STARTED_EVENT_CODE

public static final int PART_STARTED_EVENT_CODE
See Also:
Constant Field Values

PART_COMPLETED_EVENT_CODE

public static final int PART_COMPLETED_EVENT_CODE
See Also:
Constant Field Values

PART_FAILED_EVENT_CODE

public static final int PART_FAILED_EVENT_CODE
See Also:
Constant Field Values
Constructor Detail

ProgressEvent

public ProgressEvent(long bytesTransferred)

ProgressEvent

public ProgressEvent(int eventCode,
                     long bytesTransferred)
Method Detail

setBytesTransferred

public void setBytesTransferred(long bytesTransferred)
Sets the number of bytes transferred since the last progress event.

Parameters:
bytesTransferred - The number of bytes transferred since the last progress event.

getBytesTransferred

public long getBytesTransferred()
Returns the number of bytes transferred since the last progress event.

Returns:
The number of bytes transferred since the last progress event.

getEventCode

public int getEventCode()
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.

setEventCode

public void setEventCode(int eventType)
Sets the unique event code identifying the type of event this object represents.

Parameters:
eventType - The unique event code that identifies what type of specific type of event this object represents.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.