Package com.amazonaws.event.request
Class ProgressSupport
- java.lang.Object
-
- com.amazonaws.event.request.Progress
-
- com.amazonaws.event.request.ProgressSupport
-
public class ProgressSupport extends Progress
An actual implementation to represent the progress of a request/response.
-
-
Constructor Summary
Constructors Constructor Description ProgressSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRequestBytesTransferred(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.longgetRequestBytesTransferred()Returns the number of bytes that have been transferred in the request.longgetRequestContentLength()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).longgetResponseBytesTransferred()Returns the number of bytes that have been transferred in the response.longgetResponseContentLength()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).booleanisEnabled()Returns true if progress tracking is enabled; false otherwise.StringtoString()
-
-
-
Method Detail
-
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.
-
-