Package io.undertow.protocols.http2
Class Http2DataStreamSinkChannel
java.lang.Object
io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>
io.undertow.protocols.http2.AbstractHttp2StreamSinkChannel
io.undertow.protocols.http2.Http2StreamSinkChannel
io.undertow.protocols.http2.Http2DataStreamSinkChannel
- All Implemented Interfaces:
Http2Stream,Closeable,AutoCloseable,Channel,GatheringByteChannel,InterruptibleChannel,WritableByteChannel,org.xnio.channels.CloseableChannel,org.xnio.channels.Configurable,org.xnio.channels.StreamSinkChannel,org.xnio.channels.SuspendableWriteChannel
- Direct Known Subclasses:
Http2HeadersStreamSinkChannel,Http2PushPromiseStreamSinkChannel
Headers channel
- Author:
- Stuart Douglas
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.xnio.channels.Configurable
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled when a channel has been forcibly closed, and data (frames) have already been written.protected SendFrameHeaderbooleanflush()org.xnio.ChannelListener<Http2DataStreamSinkChannel>protected voidhandleFlushComplete(boolean finalFrame) protected booleanvoidsetCompletionListener(org.xnio.ChannelListener<Http2DataStreamSinkChannel> completionListener) voidsetTrailersProducer(Http2DataStreamSinkChannel.TrailersProducer trailersProducer) intwrite(ByteBuffer src) longwrite(ByteBuffer[] srcs) longwrite(ByteBuffer[] srcs, int offset, int length) protected voidwriteBeforeHeaderBlock(ByteBuffer buffer) intwriteFinal(ByteBuffer src) longwriteFinal(ByteBuffer[] srcs) longwriteFinal(ByteBuffer[] srcs, int offset, int length) Methods inherited from class io.undertow.protocols.http2.Http2StreamSinkChannel
allocateAll, awaitWritable, awaitWritable, createFrameHeader, getStreamId, grabFlowControlBytesMethods inherited from class io.undertow.protocols.http2.AbstractHttp2StreamSinkChannel
isLastFrameMethods inherited from class io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel
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, wakeupWritesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.undertow.protocols.http2.Http2Stream
getStreamId
-
Method Details
-
getTrailersProducer
-
setTrailersProducer
-
createFrameHeaderImpl
- Specified by:
createFrameHeaderImplin classHttp2StreamSinkChannel
-
write
- Specified by:
writein interfaceGatheringByteChannel- Overrides:
writein classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
write
- Specified by:
writein interfaceGatheringByteChannel- Overrides:
writein classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
write
- Specified by:
writein interfaceWritableByteChannel- Overrides:
writein classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.channels.StreamSinkChannel- Overrides:
writeFinalin classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.channels.StreamSinkChannel- Overrides:
writeFinalin classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
writeFinal
- Specified by:
writeFinalin interfaceorg.xnio.channels.StreamSinkChannel- Overrides:
writeFinalin classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
flush
- Specified by:
flushin interfaceorg.xnio.channels.SuspendableWriteChannel- Overrides:
flushin classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel, AbstractHttp2StreamSinkChannel> - Throws:
IOException
-
writeBeforeHeaderBlock
-
isFlushRequiredOnEmptyBuffer
protected boolean isFlushRequiredOnEmptyBuffer() -
getHeaders
-
handleFlushComplete
protected void handleFlushComplete(boolean finalFrame) - Overrides:
handleFlushCompletein classHttp2StreamSinkChannel
-
channelForciblyClosed
Description copied from class:AbstractFramedStreamSinkChannelCalled when a channel has been forcibly closed, and data (frames) have already been written. The action this should take is protocol dependent, e.g. for SPDY a RST_STREAM should be sent, for websockets the channel should be closed. By default this will just close the underlying channel- Overrides:
channelForciblyClosedin classHttp2StreamSinkChannel- Throws:
IOException
-
getCompletionListener
-
setCompletionListener
public void setCompletionListener(org.xnio.ChannelListener<Http2DataStreamSinkChannel> completionListener)
-