@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 Progress
public void addRequestContentLength(long contentLength)
addRequestContentLength
in class Progress
public long getRequestBytesTransferred()
getRequestBytesTransferred
in class Progress
public long getResponseContentLength()
getResponseContentLength
in class Progress
public void addResponseContentLength(long contentLength)
addResponseContentLength
in class Progress
public long getResponseBytesTransferred()
getResponseBytesTransferred
in class Progress
public void addRequestBytesTransferred(long bytes)
addRequestBytesTransferred
in class Progress
bytes
- can be negative if it was a reset event.public void addResponseBytesTransferred(long bytes)
addResponseBytesTransferred
in class Progress
bytes
- can be negative if it was a reset event.Copyright © 2021. All rights reserved.