Class ProgressSupport
java.lang.Object
com.amazonaws.event.request.Progress
com.amazonaws.event.request.ProgressSupport
An actual implementation to represent the progress of a request/response.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestBytesTransferred(long bytes) voidaddRequestContentLength(long contentLength) Adds the number of bytes to be expected in the request.voidaddResponseBytesTransferred(long bytes) voidaddResponseContentLength(long contentLength) Adds the number of bytes to be expected in the response.longReturns the number of bytes that have been transferred in the request.longReturns the number of bytes to be expected in the request, or -1 if the number is unknown (e.g. when the request is still not serialized yet, or when the request contains raw InputStream as the payload in which case the SDK cannot infer the content-length in advance).longReturns the number of bytes that have been transferred in the response.longReturns the number of bytes to be expected in the response, or -1 if the number is unknown (e.g. when the client hasn't received the response yet).final booleanReturns true if progress tracking is enabled; false otherwise.toString()
-
Constructor Details
-
ProgressSupport
public ProgressSupport()
-
-
Method Details
-
getRequestContentLength
public long getRequestContentLength()Returns the number of bytes to be expected in the request, or -1 if the number is unknown (e.g. when the request is still not serialized yet, or when the request contains raw InputStream as the payload in which case the SDK cannot infer the content-length in advance).- Overrides:
getRequestContentLengthin classProgress
-
addRequestContentLength
public void addRequestContentLength(long contentLength) Adds the number of bytes to be expected in the request.- Overrides:
addRequestContentLengthin classProgress
-
getRequestBytesTransferred
public long getRequestBytesTransferred()Returns the number of bytes that have been transferred in the request.- Overrides:
getRequestBytesTransferredin classProgress
-
getResponseContentLength
public long getResponseContentLength()Returns the number of bytes to be expected in the response, or -1 if the number is unknown (e.g. when the client hasn't received the response yet).- Overrides:
getResponseContentLengthin classProgress
-
addResponseContentLength
public void addResponseContentLength(long contentLength) Adds the number of bytes to be expected in the response.- Overrides:
addResponseContentLengthin classProgress
-
getResponseBytesTransferred
public long getResponseBytesTransferred()Returns the number of bytes that have been transferred in the response.- Overrides:
getResponseBytesTransferredin classProgress
-
addRequestBytesTransferred
public void addRequestBytesTransferred(long bytes) - Overrides:
addRequestBytesTransferredin classProgress- Parameters:
bytes- can be negative if it was a reset event.
-
addResponseBytesTransferred
public void addResponseBytesTransferred(long bytes) - Overrides:
addResponseBytesTransferredin classProgress- Parameters:
bytes- can be negative if it was a reset event.
-
toString
-
isEnabled
-