com.ning.http.client.providers.grizzly
Class FeedableBodyGenerator
java.lang.Object
com.ning.http.client.providers.grizzly.FeedableBodyGenerator
- All Implemented Interfaces:
- BodyGenerator
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.
- Since:
- 1.7.0
- Author:
- The Grizzly Team
Method Summary |
Body |
createBody()
Creates a new instance of the request body to be read. |
void |
feed(org.glassfish.grizzly.Buffer buffer,
boolean isLast)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeedableBodyGenerator
public FeedableBodyGenerator()
createBody
public Body createBody()
throws IOException
- Description copied from interface:
BodyGenerator
- Creates a new instance of the request body to be read. While each invocation of this method is supposed to create
a fresh instance of the body, the actual contents of all these body instances is the same. For example, the body
needs to be resend after an authentication challenge of a redirect.
- Specified by:
createBody
in interface BodyGenerator
- Returns:
- The request body, never
null
.
- Throws:
IOException
- If the body could not be created.
feed
public void feed(org.glassfish.grizzly.Buffer buffer,
boolean isLast)
throws IOException
- Throws:
IOException
Copyright © 2011. All Rights Reserved.