com.amazonaws.metrics
Class MetricInputStreamEntity

java.lang.Object
  extended by org.apache.http.entity.AbstractHttpEntity
      extended by org.apache.http.entity.InputStreamEntity
          extended by com.amazonaws.metrics.MetricInputStreamEntity
All Implemented Interfaces:
org.apache.http.HttpEntity

public class MetricInputStreamEntity
extends org.apache.http.entity.InputStreamEntity

Used to help capture the throughput metrics.

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.


Field Summary
 
Fields inherited from class org.apache.http.entity.AbstractHttpEntity
chunked, contentEncoding, contentType
 
Constructor Summary
MetricInputStreamEntity(ThroughputMetricType metricType, InputStream instream, long length)
           
MetricInputStreamEntity(ThroughputMetricType metricType, InputStream instream, long length, org.apache.http.entity.ContentType contentType)
           
 
Method Summary
 void writeTo(OutputStream outstream)
           
 
Methods inherited from class org.apache.http.entity.InputStreamEntity
consumeContent, getContent, getContentLength, isRepeatable, isStreaming
 
Methods inherited from class org.apache.http.entity.AbstractHttpEntity
getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricInputStreamEntity

public MetricInputStreamEntity(ThroughputMetricType metricType,
                               InputStream instream,
                               long length)

MetricInputStreamEntity

public MetricInputStreamEntity(ThroughputMetricType metricType,
                               InputStream instream,
                               long length,
                               org.apache.http.entity.ContentType contentType)
Method Detail

writeTo

public void writeTo(OutputStream outstream)
             throws IOException
Specified by:
writeTo in interface org.apache.http.HttpEntity
Overrides:
writeTo in class org.apache.http.entity.InputStreamEntity
Throws:
IOException


Copyright © 2016. All rights reserved.