Package io.undertow.protocols.http2
Class Http2StreamSourceChannel
- java.lang.Object
-
- io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>
-
- io.undertow.protocols.http2.AbstractHttp2StreamSourceChannel
-
- io.undertow.protocols.http2.Http2StreamSourceChannel
-
- All Implemented Interfaces:
Http2Stream,java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.InterruptibleChannel,java.nio.channels.ReadableByteChannel,java.nio.channels.ScatteringByteChannel,org.xnio.channels.CloseableChannel,org.xnio.channels.Configurable,org.xnio.channels.StreamSourceChannel,org.xnio.channels.SuspendableReadChannel
public class Http2StreamSourceChannel extends AbstractHttp2StreamSourceChannel implements Http2Stream
- Author:
- Stuart Douglas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHttp2StreamSourceChannel.TrailersHandler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchannelForciblyClosed()protected voidcomplete()Method that is invoked when all data has been read.org.xnio.ChannelListener<Http2StreamSourceChannel>getCompletionListener()HeaderMapgetHeaders()Http2HeadersStreamSinkChannelgetResponseChannel()intgetStreamId()Http2StreamSourceChannel.TrailersHandlergetTrailersHandler()protected voidhandleHeaderData(FrameHeaderData headerData)booleanisIgnoreForceClose()intread(java.nio.ByteBuffer dst)longread(java.nio.ByteBuffer[] dsts)longread(java.nio.ByteBuffer[] dsts, int offset, int length)voidsetCompletionListener(org.xnio.ChannelListener<Http2StreamSourceChannel> completionListener)voidsetIgnoreForceClose(boolean ignoreForceClose)voidsetTrailersHandler(Http2StreamSourceChannel.TrailersHandler trailersHandler)java.lang.StringtoString()longtransferTo(long position, long count, java.nio.channels.FileChannel target)longtransferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel streamSinkChannel)protected longupdateFrameDataRemaining(PooledByteBuffer data, long frameDataRemaining)-
Methods inherited from class io.undertow.protocols.http2.AbstractHttp2StreamSourceChannel
getFramedChannel, getHttp2Channel, lastFrame, markStreamBroken
-
Methods inherited from class io.undertow.server.protocol.framed.AbstractFramedStreamSourceChannel
addCloseTask, awaitReadable, awaitReadable, close, dataReady, getCloseSetter, getIoThread, getMaxStreamSize, getOption, getReadFrameCount, getReadSetter, getReadThread, getWorker, isComplete, isLastFrame, isOpen, isReadResumed, processFrameData, resumeReads, setMaxStreamSize, setOption, shutdownReads, supportsOption, suspendReads, wakeupReads
-
-
-
-
Method Detail
-
handleHeaderData
protected void handleHeaderData(FrameHeaderData headerData)
- Overrides:
handleHeaderDatain classAbstractHttp2StreamSourceChannel
-
updateFrameDataRemaining
protected long updateFrameDataRemaining(PooledByteBuffer data, long frameDataRemaining)
-
getResponseChannel
public Http2HeadersStreamSinkChannel getResponseChannel()
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Overrides:
readin classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ScatteringByteChannel- Overrides:
readin classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ScatteringByteChannel- Overrides:
readin classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
transferTo
public long transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel streamSinkChannel) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.channels.StreamSourceChannel- Overrides:
transferToin classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
transferTo
public long transferTo(long position, long count, java.nio.channels.FileChannel target) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.channels.StreamSourceChannel- Overrides:
transferToin classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
complete
protected void complete() throws java.io.IOExceptionDescription copied from class:AbstractFramedStreamSourceChannelMethod that is invoked when all data has been read.- Overrides:
completein classAbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>- Throws:
java.io.IOException
-
getHeaders
public HeaderMap getHeaders()
-
getCompletionListener
public org.xnio.ChannelListener<Http2StreamSourceChannel> getCompletionListener()
-
setCompletionListener
public void setCompletionListener(org.xnio.ChannelListener<Http2StreamSourceChannel> completionListener)
-
channelForciblyClosed
protected void channelForciblyClosed()
-
setIgnoreForceClose
public void setIgnoreForceClose(boolean ignoreForceClose)
-
isIgnoreForceClose
public boolean isIgnoreForceClose()
-
getStreamId
public int getStreamId()
- Specified by:
getStreamIdin interfaceHttp2Stream
-
getTrailersHandler
public Http2StreamSourceChannel.TrailersHandler getTrailersHandler()
-
setTrailersHandler
public void setTrailersHandler(Http2StreamSourceChannel.TrailersHandler trailersHandler)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-