@ThreadSafe public class ProgressSupport extends Progress
| Constructor and Description |
|---|
ProgressSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequestBytesTransferred(long bytes) |
void |
addRequestContentLength(long contentLength)
Adds the number of bytes to be expected in the request.
|
void |
addResponseBytesTransferred(long bytes) |
void |
addResponseContentLength(long contentLength)
Adds the number of bytes to be expected in the response.
|
long |
getRequestBytesTransferred()
Returns the number of bytes that have been transferred in the request.
|
long |
getRequestContentLength()
Returns the number of bytes to be expected in the request, or -1 if the
number is unknown (e.g.
|
long |
getResponseBytesTransferred()
Returns the number of bytes that have been transferred in the response.
|
long |
getResponseContentLength()
Returns the number of bytes to be expected in the response, or -1 if the
number is unknown (e.g.
|
boolean |
isEnabled()
Returns true if progress tracking is enabled; false otherwise.
|
String |
toString() |
public long getRequestContentLength()
getRequestContentLength in class Progresspublic void addRequestContentLength(long contentLength)
addRequestContentLength in class Progresspublic long getRequestBytesTransferred()
getRequestBytesTransferred in class Progresspublic long getResponseContentLength()
getResponseContentLength in class Progresspublic void addResponseContentLength(long contentLength)
addResponseContentLength in class Progresspublic long getResponseBytesTransferred()
getResponseBytesTransferred in class Progresspublic void addRequestBytesTransferred(long bytes)
addRequestBytesTransferred in class Progressbytes - can be negative if it was a reset event.public void addResponseBytesTransferred(long bytes)
addResponseBytesTransferred in class Progressbytes - can be negative if it was a reset event.