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, Closeable, AutoCloseable, Channel, InterruptibleChannel, ReadableByteChannel, 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
`static interface` `Http2StreamSourceChannel.TrailersHandler`

### Field Summary

### Fields inherited from interface org.xnio.channels.Configurable

`EMPTY`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `channelForciblyClosed()`
`protected void` `complete()` Method that is invoked when all data has been read.
`org.xnio.ChannelListener<Http2StreamSourceChannel>` `getCompletionListener()`
`HeaderMap` `getHeaders()`
`Http2HeadersStreamSinkChannel` `getResponseChannel()`
`int` `getStreamId()`
`Http2StreamSourceChannel.TrailersHandler` `getTrailersHandler()`
`protected void` `handleHeaderData(FrameHeaderData headerData)`
`boolean` `isIgnoreForceClose()`
`int` `read(ByteBuffer dst)`
`long` `read(ByteBuffer[] dsts)`
`long` `read(ByteBuffer[] dsts, int offset, int length)`
`void` `setCompletionListener(org.xnio.ChannelListener<Http2StreamSourceChannel> completionListener)`
`void` `setIgnoreForceClose(boolean ignoreForceClose)`
`void` `setTrailersHandler(Http2StreamSourceChannel.TrailersHandler trailersHandler)`
`String` `toString()`
`long` `transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel streamSinkChannel)`
`long` `transferTo(long position, long count, FileChannel target)`
`protected long` `updateFrameDataRemaining(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### handleHeaderData

    protected void handleHeaderData(FrameHeaderData headerData)

Overrides:
  `handleHeaderData` in class `AbstractHttp2StreamSourceChannel`

#### updateFrameDataRemaining

    protected long updateFrameDataRemaining(PooledByteBuffer data,
                                            long frameDataRemaining)

Overrides:
  `updateFrameDataRemaining` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`

#### getResponseChannel

    public Http2HeadersStreamSinkChannel getResponseChannel()

#### read

    public int read(ByteBuffer dst)
             throws IOException

Specified by:
  `read` in interface `ReadableByteChannel`
Overrides:
  `read` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `IOException`

#### read

    public long read(ByteBuffer[] dsts,
                     int offset,
                     int length)
              throws IOException

Specified by:
  `read` in interface `ScatteringByteChannel`
Overrides:
  `read` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `IOException`

#### read

    public long read(ByteBuffer[] dsts)
              throws IOException

Specified by:
  `read` in interface `ScatteringByteChannel`
Overrides:
  `read` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `IOException`

#### transferTo

    public long transferTo(long count,
                           ByteBuffer throughBuffer,
                           org.xnio.channels.StreamSinkChannel streamSinkChannel)
                    throws IOException

Specified by:
  `transferTo` in interface `org.xnio.channels.StreamSourceChannel`
Overrides:
  `transferTo` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `IOException`

#### transferTo

    public long transferTo(long position,
                           long count,
                           FileChannel target)
                    throws IOException

Specified by:
  `transferTo` in interface `org.xnio.channels.StreamSourceChannel`
Overrides:
  `transferTo` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `IOException`

#### complete

    protected void complete()
                     throws IOException

Description copied from class: `AbstractFramedStreamSourceChannel`
Method that is invoked when all data has been read.

Overrides:
  `complete` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`
Throws:
  `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()

Overrides:
  `channelForciblyClosed` in class `AbstractFramedStreamSourceChannel<Http2Channel,AbstractHttp2StreamSourceChannel,AbstractHttp2StreamSinkChannel>`

#### setIgnoreForceClose

    public void setIgnoreForceClose(boolean ignoreForceClose)

#### isIgnoreForceClose

    public boolean isIgnoreForceClose()

#### getStreamId

    public int getStreamId()

Specified by:
  `getStreamId` in interface `Http2Stream`

#### getTrailersHandler

    public Http2StreamSourceChannel.TrailersHandler getTrailersHandler()

#### setTrailersHandler

    public void setTrailersHandler(Http2StreamSourceChannel.TrailersHandler trailersHandler)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`