public class MetricInputStreamEntity
extends org.apache.http.entity.InputStreamEntity
Note this class is only relevant when metric is enabled. Otherwise it should not even be involved in the call stack to minimize runtime overhead.
Modifier and Type | Field and Description |
---|---|
private static int |
BUFFER_SIZE |
private ByteThroughputHelper |
helper |
Constructor and Description |
---|
MetricInputStreamEntity(ThroughputMetricType metricType,
java.io.InputStream instream,
long length) |
MetricInputStreamEntity(ThroughputMetricType metricType,
java.io.InputStream instream,
long length,
org.apache.http.entity.ContentType contentType) |
Modifier and Type | Method and Description |
---|---|
void |
writeTo(java.io.OutputStream outstream) |
private void |
writeToWithMetrics(java.io.OutputStream outstream)
Copied from {
InputStreamEntity.writeTo(OutputStream) but modified
to capture metrics for the output stream. |
getContent, getContentLength, isRepeatable, isStreaming
private static final int BUFFER_SIZE
private final ByteThroughputHelper helper
public MetricInputStreamEntity(ThroughputMetricType metricType, java.io.InputStream instream, long length)
public MetricInputStreamEntity(ThroughputMetricType metricType, java.io.InputStream instream, long length, org.apache.http.entity.ContentType contentType)
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException
writeTo
in interface org.apache.http.HttpEntity
writeTo
in class org.apache.http.entity.InputStreamEntity
java.io.IOException
private void writeToWithMetrics(java.io.OutputStream outstream) throws java.io.IOException
InputStreamEntity.writeTo(OutputStream)
but modified
to capture metrics for the output stream.java.io.IOException