public class FeedableBodyGenerator extends Object implements BodyGenerator
BodyGenerator which may return just part of the payload at the time handler is requesting it.
If it happens, PartialBodyGenerator becomes responsible for finishing payload transferring asynchronously.| Modifier and Type | Class and Description |
|---|---|
static interface |
FeedableBodyGenerator.FeedListener |
| Constructor and Description |
|---|
FeedableBodyGenerator() |
| Modifier and Type | Method and Description |
|---|---|
Body |
createBody()
Creates a new instance of the request body to be read.
|
void |
feed(ByteBuffer buffer,
boolean isLast) |
void |
setListener(FeedableBodyGenerator.FeedListener listener) |
public Body createBody() throws IOException
BodyGeneratorcreateBody in interface BodyGeneratornull.IOException - If the body could not be created.public void feed(ByteBuffer buffer, boolean isLast) throws IOException
IOExceptionpublic void setListener(FeedableBodyGenerator.FeedListener listener)
Copyright © 2014. All Rights Reserved.