public class Http2DataStreamSinkChannel extends Http2StreamSinkChannel implements Http2Stream
| Modifier and Type | Class and Description |
|---|---|
static interface |
Http2DataStreamSinkChannel.TrailersProducer |
EMPTYallocateAll, createFrameHeader, getStreamId, grabFlowControlBytesisLastFrameawaitWritable, awaitWritable, close, getAwaitWritableTimeout, getBuffer, getChannel, getCloseSetter, getIoThread, getOption, getWorker, getWriteSetter, getWriteThread, isBroken, isBufferFull, isFinalFrameQueued, isFirstDataWritten, isOpen, isReadyForFlush, isWriteResumed, isWritesShutdown, markBroken, preWriteTransform, resumeWrites, resumeWritesInternal, safeToSend, send, sendInternal, setOption, shutdownWrites, supportsOption, suspendWrites, transferFrom, transferFrom, wakeupWritesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetStreamIdpublic Http2DataStreamSinkChannel.TrailersProducer getTrailersProducer()
public void setTrailersProducer(Http2DataStreamSinkChannel.TrailersProducer trailersProducer)
protected SendFrameHeader createFrameHeaderImpl()
createFrameHeaderImpl in class Http2StreamSinkChannelpublic long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface GatheringByteChannelwrite in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>IOExceptionpublic long write(ByteBuffer[] srcs) throws IOException
write in interface GatheringByteChannelwrite in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>IOExceptionpublic int write(ByteBuffer src) throws IOException
write in interface WritableByteChannelwrite in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>IOExceptionpublic long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException
StreamSinkChannelGatheringByteChannel.write(java.nio.ByteBuffer[], int, int). If all the data is written
out then the channel will have its writes shutdown.
If an exception is thrown the caller is still responsible for closing the channel.writeFinal in interface StreamSinkChannelwriteFinal in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>srcs - The buffers from which bytes are to be retrievedoffset - The offset within the buffer array of the first buffer from
which bytes are to be retrieved; must be non-negative and no
larger than srcs.lengthlength - The maximum number of buffers to be accessed; must be
non-negative and no larger than
srcs.length - offsetIOExceptionGatheringByteChannel.write(java.nio.ByteBuffer[], int, int),
SuspendableWriteChannel.shutdownWrites()public long writeFinal(ByteBuffer[] srcs) throws IOException
StreamSinkChannelGatheringByteChannel.write(java.nio.ByteBuffer[]). If all the data is written
out then the channel will have its writes shutdown.
If an exception is thrown the caller is still responsible for closing the channel.writeFinal in interface StreamSinkChannelwriteFinal in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>srcs - The buffers from which bytes are to be retrievedIOExceptionGatheringByteChannel.write(java.nio.ByteBuffer[]),
SuspendableWriteChannel.shutdownWrites()public int writeFinal(ByteBuffer src) throws IOException
StreamSinkChannelWritableByteChannel.write(java.nio.ByteBuffer). If all the data is written
out then the channel will have its writes shutdown. Semantically this
method is equivalent to:
int rem = src.remaining();
int written = channel.write(src);
if(written == rem) {
channel.shutdownWrites()
}
If an exception is thrown the caller is still responsible for closing the channel.writeFinal in interface StreamSinkChannelwriteFinal in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>src - The data to writeIOExceptionWritableByteChannel.write(java.nio.ByteBuffer),
SuspendableWriteChannel.shutdownWrites()public boolean flush()
throws IOException
SuspendableWriteChanneltrue. If there is data to flush which cannot be immediately written, this method
will return false. If this method returns true after SuspendableWriteChannel.shutdownWrites() was called on
this channel, the write listener will no longer be invoked on this channel. If this is case and additionally
this is a write-only channel or the read side was previously shut down, then the channel will
automatically be closed.flush in interface SuspendableWriteChannelflush in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>true if the message was flushed, or false if the result would blockIOException - if an I/O error occursprotected void writeBeforeHeaderBlock(ByteBuffer buffer)
protected boolean isFlushRequiredOnEmptyBuffer()
public HeaderMap getHeaders()
protected void handleFlushComplete(boolean finalFrame)
handleFlushComplete in class Http2StreamSinkChannelprotected void channelForciblyClosed()
throws IOException
AbstractFramedStreamSinkChannelchannelForciblyClosed in class Http2StreamSinkChannelIOExceptionpublic ChannelListener<Http2DataStreamSinkChannel> getCompletionListener()
public void setCompletionListener(ChannelListener<Http2DataStreamSinkChannel> completionListener)
Copyright © 2025 JBoss by Red Hat. All rights reserved.