public class ThrottledHttpEntity extends Object implements HttpEntityWrapper
The body of this entity will be the body of the origin entity, but throttled for throughput.
See ThrottledByteSource.
This entity is sharable iff the origin entity is sharable.
| Constructor and Description |
|---|
ThrottledHttpEntity(HttpEntity origin,
int bufferSize,
ThrottledByteSource.Curve curve)
Create a throttled wrapper of the origin entity.
|
ThrottledHttpEntity(HttpEntity origin,
int bufferSize,
long b0,
long bytesPerSecond)
Create a throttled wrapper of the origin source, with a linear curve.
|
| Instance Methods | |
|---|---|
HttpEntity |
getOriginEntity()
The origin entity.
|
ByteSource |
body()
The entity body.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontentEncoding, contentLength, contentType, etag, etagIsWeak, expires, lastModifiedbodyBytes, bodyStringpublic ThrottledHttpEntity(HttpEntity origin, int bufferSize, ThrottledByteSource.Curve curve)
See ThrottledByteSource.ThrottledByteSource(ByteSource, int, ThrottledByteSource.Curve).
public ThrottledHttpEntity(HttpEntity origin, int bufferSize, long b0, long bytesPerSecond)
See ThrottledByteSource.ThrottledByteSource(ByteSource, int, long, long)
public HttpEntity getOriginEntity()
getOriginEntity in interface HttpEntityWrapperpublic ByteSource body()
The body of this entity will be the body of the origin entity, but throttled for throughput.
body in interface HttpEntitybody in interface HttpEntityWrapper