public abstract class Http2StreamSinkChannel extends AbstractHttp2StreamSinkChannel
Modifier and Type | Method and Description |
---|---|
protected PooledByteBuffer[] |
allocateAll(PooledByteBuffer[] allHeaderBuffers,
PooledByteBuffer currentBuffer) |
void |
awaitWritable()
Invokes super awaitWritable, with an extra check for flowControlWindow.
|
void |
awaitWritable(long time,
TimeUnit timeUnit)
Invokes super awaitWritable, with an extra check for flowControlWindow.
|
protected void |
channelForciblyClosed()
Called when a channel has been forcibly closed, and data (frames) have already been written.
|
protected SendFrameHeader |
createFrameHeader() |
protected abstract SendFrameHeader |
createFrameHeaderImpl() |
int |
getStreamId() |
protected int |
grabFlowControlBytes(int toSend)
This method should be called before sending.
|
protected void |
handleFlushComplete(boolean channelClosed) |
isLastFrame
close, flush, getAwaitWritableTimeout, getBuffer, getChannel, getCloseSetter, getIoThread, getOption, getWorker, getWriteSetter, getWriteThread, isBroken, isBufferFull, isFinalFrameQueued, isFirstDataWritten, isFlushRequiredOnEmptyBuffer, isOpen, isReadyForFlush, isWriteResumed, isWritesShutdown, markBroken, preWriteTransform, resumeWrites, resumeWritesInternal, safeToSend, send, sendInternal, setOption, shutdownWrites, supportsOption, suspendWrites, transferFrom, transferFrom, wakeupWrites, write, write, write, writeFinal, writeFinal, writeFinal
public int getStreamId()
protected abstract SendFrameHeader createFrameHeaderImpl()
protected void channelForciblyClosed() throws IOException
AbstractFramedStreamSinkChannel
protected final SendFrameHeader createFrameHeader()
protected void handleFlushComplete(boolean channelClosed)
protected int grabFlowControlBytes(int toSend)
It will decrement the flow control windows by the amount that can be sent, so this method should only be called as a frame is being queued.
protected PooledByteBuffer[] allocateAll(PooledByteBuffer[] allHeaderBuffers, PooledByteBuffer currentBuffer)
public void awaitWritable() throws IOException
AbstractFramedStreamSinkChannel.getAwaitWritableTimeout()
awaitWritable
in interface org.xnio.channels.SuspendableWriteChannel
awaitWritable
in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>
IOException
- if an IO error occurspublic void awaitWritable(long time, TimeUnit timeUnit) throws IOException
awaitWritable
in interface org.xnio.channels.SuspendableWriteChannel
awaitWritable
in class AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>
time
- the time to waittimeUnit
- the time unitIOException
- if an IO error occursCopyright © 2023 JBoss by Red Hat. All rights reserved.