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.AbstractBinAsyncEntityProducer
An 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 int
availableData()
void
failed(java.lang.Exception cause)
long
getContentLength()
boolean
isRepeatable()
protected void
produceData(org.apache.hc.core5.http.nio.StreamChannel<java.nio.ByteBuffer> channel)
void
releaseResources()
-
-
-
Method Detail
-
releaseResources
public void releaseResources()
- Specified by:
releaseResources
in interfaceorg.apache.hc.core5.http.nio.ResourceHolder
- Overrides:
releaseResources
in classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
isRepeatable
public boolean isRepeatable()
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceorg.apache.hc.core5.http.EntityDetails
- Overrides:
getContentLength
in classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
-
availableData
public int availableData()
- Specified by:
availableData
in 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:
produceData
in classorg.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityProducer
- Throws:
java.io.IOException
-
failed
public void failed(java.lang.Exception cause)
-
-