public abstract static class FeedableBodyGenerator.BaseFeeder extends Object implements FeedableBodyGenerator.Feeder
FeedableBodyGenerator.Feeder
implementations. This class provides
an implementation for the contract defined by the feed(org.glassfish.grizzly.Buffer, boolean)
method.Modifier and Type | Field and Description |
---|---|
protected FeedableBodyGenerator |
feedableBodyGenerator |
Modifier | Constructor and Description |
---|---|
protected |
FeedableBodyGenerator.BaseFeeder(FeedableBodyGenerator feedableBodyGenerator) |
Modifier and Type | Method and Description |
---|---|
void |
feed(org.glassfish.grizzly.Buffer buffer,
boolean last)
This method will write the specified
Buffer to the connection. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flush
protected final FeedableBodyGenerator feedableBodyGenerator
protected FeedableBodyGenerator.BaseFeeder(FeedableBodyGenerator feedableBodyGenerator)
public final void feed(org.glassfish.grizzly.Buffer buffer, boolean last) throws IOException
FeedableBodyGenerator.Feeder
Buffer
to the connection.
Be aware that this method may block depending if data is being fed
faster than it can write. How much data may be queued is dictated
by FeedableBodyGenerator.setMaxPendingBytes(int)
. Once this threshold is exceeded,
the method will block until the write queue length drops below the
aforementioned threshold.feed
in interface FeedableBodyGenerator.Feeder
buffer
- the Buffer
to write.last
- flag indicating if this is the last buffer to send.IOException
- if an I/O error occurs.FeedableBodyGenerator.setMaxPendingBytes(int)
Copyright © 2015. All Rights Reserved.