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,java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.GatheringByteChannel,java.nio.channels.InterruptibleChannel,java.nio.channels.WritableByteChannel,org.xnio.channels.CloseableChannel,org.xnio.channels.Configurable,org.xnio.channels.StreamSinkChannel,org.xnio.channels.SuspendableWriteChannel
- Direct Known Subclasses:
Http2HeadersStreamSinkChannel,Http2PushPromiseStreamSinkChannel
public class Http2DataStreamSinkChannel extends Http2StreamSinkChannel implements Http2Stream
Headers channel- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttp2DataStreamSinkChannel.TrailersProducer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchannelForciblyClosed()Called when a channel has been forcibly closed, and data (frames) have already been written.protected SendFrameHeadercreateFrameHeaderImpl()booleanflush()org.xnio.ChannelListener<Http2DataStreamSinkChannel>getCompletionListener()HeaderMapgetHeaders()Http2DataStreamSinkChannel.TrailersProducergetTrailersProducer()protected voidhandleFlushComplete(boolean finalFrame)protected booleanisFlushRequiredOnEmptyBuffer()voidsetCompletionListener(org.xnio.ChannelListener<Http2DataStreamSinkChannel> completionListener)voidsetTrailersProducer(Http2DataStreamSinkChannel.TrailersProducer trailersProducer)protected voidwriteBeforeHeaderBlock(java.nio.ByteBuffer buffer)-
Methods inherited from class io.undertow.protocols.http2.Http2StreamSinkChannel
allocateAll, createFrameHeader, getStreamId, grabFlowControlBytes
-
Methods inherited from class io.undertow.protocols.http2.AbstractHttp2StreamSinkChannel
isLastFrame
-
Methods inherited from class io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel
awaitWritable, awaitWritable, close, 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, wakeupWrites, write, write, write, writeFinal, writeFinal, writeFinal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.undertow.protocols.http2.Http2Stream
getStreamId
-
-
-
-
Method Detail
-
getTrailersProducer
public Http2DataStreamSinkChannel.TrailersProducer getTrailersProducer()
-
setTrailersProducer
public void setTrailersProducer(Http2DataStreamSinkChannel.TrailersProducer trailersProducer)
-
createFrameHeaderImpl
protected SendFrameHeader createFrameHeaderImpl()
- Specified by:
createFrameHeaderImplin classHttp2StreamSinkChannel
-
flush
public boolean flush() throws java.io.IOException- Specified by:
flushin interfaceorg.xnio.channels.SuspendableWriteChannel- Overrides:
flushin classAbstractFramedStreamSinkChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
writeBeforeHeaderBlock
protected void writeBeforeHeaderBlock(java.nio.ByteBuffer buffer)
-
isFlushRequiredOnEmptyBuffer
protected boolean isFlushRequiredOnEmptyBuffer()
-
getHeaders
public HeaderMap getHeaders()
-
handleFlushComplete
protected void handleFlushComplete(boolean finalFrame)
- Overrides:
handleFlushCompletein classHttp2StreamSinkChannel
-
channelForciblyClosed
protected void channelForciblyClosed() throws java.io.IOExceptionDescription 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:
java.io.IOException
-
getCompletionListener
public org.xnio.ChannelListener<Http2DataStreamSinkChannel> getCompletionListener()
-
setCompletionListener
public void setCompletionListener(org.xnio.ChannelListener<Http2DataStreamSinkChannel> completionListener)
-
-