Class AsyncRandomHandler.RandomBinAsyncEntityProducer
- java.lang.Object
-
- org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
- org.apache.hc.client5.testing.async.AsyncRandomHandler.RandomBinAsyncEntityProducer
-
- All Implemented Interfaces:
org.apache.hc.core5.http.EntityDetails,org.apache.hc.core5.http.nio.AsyncDataProducer,org.apache.hc.core5.http.nio.AsyncEntityProducer,org.apache.hc.core5.http.nio.ResourceHolder
- Enclosing class:
- AsyncRandomHandler
public static class AsyncRandomHandler.RandomBinAsyncEntityProducer extends org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducerAn entity that generates random data.
-
-
Constructor Summary
Constructors Constructor Description RandomBinAsyncEntityProducer(long len)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailableData()voidfailed(java.lang.Exception cause)longgetContentLength()booleanisRepeatable()protected voidproduceData(org.apache.hc.core5.http.nio.StreamChannel<java.nio.ByteBuffer> channel)voidreleaseResources()
-
-
-
Method Detail
-
releaseResources
public void releaseResources()
- Specified by:
releaseResourcesin interfaceorg.apache.hc.core5.http.nio.ResourceHolder- Overrides:
releaseResourcesin classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
isRepeatable
public boolean isRepeatable()
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.hc.core5.http.EntityDetails- Overrides:
getContentLengthin classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
availableData
public int availableData()
- Specified by:
availableDatain classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
produceData
protected void produceData(org.apache.hc.core5.http.nio.StreamChannel<java.nio.ByteBuffer> channel) throws java.io.IOException- Specified by:
produceDatain classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer- Throws:
java.io.IOException
-
failed
public void failed(java.lang.Exception cause)
-
-