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
BodyGenerator
createBody
in interface BodyGenerator
null
.IOException
- If the body could not be created.public void feed(ByteBuffer buffer, boolean isLast) throws IOException
IOException
public void setListener(FeedableBodyGenerator.FeedListener listener)
Copyright © 2014. All Rights Reserved.