public class ByteBufBackedChannelOutboundInvokingHttpContentOutputStream extends AbstractByteBufBackedChannelOutboundInvokingOutputStream<HttpContent>
AbstractByteBufBackedChannelOutboundInvokingOutputStream
that writes HttpContent messages.createMessage(ByteBuf),
createLastMessage()AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreatorchannelOutboundInvoker, closeChannelOutboundInvoker| Constructor and Description |
|---|
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream(ChannelOutboundInvoker channelOutboundInvoker,
boolean closeChannelOutboundInvoker)
Creates a new
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream. |
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream(ChannelOutboundInvoker channelOutboundInvoker,
int flushThreshold,
boolean closeChannelOutboundInvoker,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
protected HttpContent |
createLastMessage()
Returns a new
DefaultLastHttpContent when invoked. |
protected HttpContent |
createMessage(ByteBuf content)
|
createMessageclose, createMessage, flush, getFlushThreshold, newPromise, write, write, writepublic ByteBufBackedChannelOutboundInvokingHttpContentOutputStream(ChannelOutboundInvoker channelOutboundInvoker, boolean closeChannelOutboundInvoker)
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream.channelOutboundInvoker - the ChannelOutboundInvoker
to which operations are adapted; must not be nullcloseChannelOutboundInvoker - whether ChannelOutboundInvoker.close(ChannelPromise) will be called on
the supplied ChannelOutboundInvoker when close() is calledByteBufBackedChannelOutboundInvokingHttpContentOutputStream(ChannelOutboundInvoker,
int, boolean,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator)public ByteBufBackedChannelOutboundInvokingHttpContentOutputStream(ChannelOutboundInvoker channelOutboundInvoker, int flushThreshold, boolean closeChannelOutboundInvoker, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
ByteBufBackedChannelOutboundInvokingHttpContentOutputStream.channelOutboundInvoker - the ChannelOutboundInvoker
to which operations are adapted; must not be nullflushThreshold - the minimum number of bytes that this
instance has to write
before an automatic flush will take place;
if less than 0 0 will be used instead; if Integer#MAX_VALUE then no automatic flushing will occurcloseChannelOutboundInvoker - whether ChannelOutboundInvoker.close(ChannelPromise) will be called on
the supplied ChannelOutboundInvoker when close() is calledbyteBufCreator - a ByteBufCreator that will be used
to create
ByteBuf instances; may be null in which
case a default ByteBufCreator adapting Unpooled.wrappedBuffer(byte[], int, int) will be
used insteadprotected HttpContent createMessage(ByteBuf content)
DefaultHttpContent whose content() method returns the
supplied ByteBuf.
This method never returns null.
createMessage in class AbstractByteBufBackedChannelOutboundInvokingOutputStream<HttpContent>content - a ByteBuf; must not be nullDefaultHttpContent whose content() method returns the
supplied ByteBuf; never nullAbstractByteBufBackedChannelOutboundInvokingOutputStream.createMessage(byte[], int, int)protected HttpContent createLastMessage()
DefaultLastHttpContent when invoked.
This method never returns null.
createLastMessage in class AbstractChannelOutboundInvokingOutputStream<HttpContent>DefaultLastHttpContentAbstractChannelOutboundInvokingOutputStream.close()Copyright © 2019–2020, microBean™. All rights reserved.