io.undertow.conduits

## Class ReadTimeoutStreamSourceConduit

- java.lang.Object
- - org.xnio.conduits.AbstractConduit<D>
  - - org.xnio.conduits.AbstractSourceConduit<D>
    - - org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
      - - io.undertow.conduits.ReadTimeoutStreamSourceConduit

All Implemented Interfaces:
  org.xnio.conduits.Conduit, org.xnio.conduits.SourceConduit, org.xnio.conduits.StreamSourceConduit

    public final class ReadTimeoutStreamSourceConduit
    extends org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>

Wrapper for read timeout. This should always be the first wrapper applied to the underlying channel.

Author:
  Stuart Douglas
See Also:
  `Options.READ_TIMEOUT`

### Field Summary

### Fields inherited from class org.xnio.conduits.AbstractConduit

`next`

### Constructor Summary

Constructors
Constructor and Description
`ReadTimeoutStreamSourceConduit(org.xnio.conduits.StreamSourceConduit delegate, org.xnio.StreamConnection connection, OpenListener openListener)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `awaitReadable()`
`void` `awaitReadable(long time, TimeUnit timeUnit)`
`int` `read(ByteBuffer dst)`
`long` `read(ByteBuffer[] dsts, int offset, int length)`
`void` `resumeReads()`
`void` `suspendReads()`
`void` `terminateReads()`
`String` `toString()`
`long` `transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)`
`long` `transferTo(long position, long count, FileChannel target)`

### Methods inherited from class org.xnio.conduits.AbstractSourceConduit

`getReadThread, isReadResumed, isReadShutdown, setReadReadyHandler, wakeupReads`

### Methods inherited from class org.xnio.conduits.AbstractConduit

`getWorker`

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

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

### Methods inherited from interface org.xnio.conduits.SourceConduit

`getReadThread, isReadResumed, isReadShutdown, setReadReadyHandler, wakeupReads`

### Methods inherited from interface org.xnio.conduits.Conduit

`getWorker`

### Constructor Detail

#### ReadTimeoutStreamSourceConduit

    public ReadTimeoutStreamSourceConduit(org.xnio.conduits.StreamSourceConduit delegate,
                                          org.xnio.StreamConnection connection,
                                          OpenListener openListener)

### Method Detail

#### transferTo

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

Specified by:
  `transferTo` in interface `org.xnio.conduits.StreamSourceConduit`
Overrides:
  `transferTo` in class `org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### transferTo

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

Specified by:
  `transferTo` in interface `org.xnio.conduits.StreamSourceConduit`
Overrides:
  `transferTo` in class `org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### read

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

Specified by:
  `read` in interface `org.xnio.conduits.StreamSourceConduit`
Overrides:
  `read` in class `org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### read

    public int read(ByteBuffer dst)
             throws IOException

Specified by:
  `read` in interface `org.xnio.conduits.StreamSourceConduit`
Overrides:
  `read` in class `org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### awaitReadable

    public void awaitReadable()
                       throws IOException

Specified by:
  `awaitReadable` in interface `org.xnio.conduits.SourceConduit`
Overrides:
  `awaitReadable` in class `org.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### awaitReadable

    public void awaitReadable(long time,
                              TimeUnit timeUnit)
                       throws IOException

Specified by:
  `awaitReadable` in interface `org.xnio.conduits.SourceConduit`
Overrides:
  `awaitReadable` in class `org.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### resumeReads

    public void resumeReads()

Specified by:
  `resumeReads` in interface `org.xnio.conduits.SourceConduit`
Overrides:
  `resumeReads` in class `org.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>`

#### terminateReads

    public void terminateReads()
                        throws IOException

Specified by:
  `terminateReads` in interface `org.xnio.conduits.SourceConduit`
Overrides:
  `terminateReads` in class `org.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>`
Throws:
  `IOException`

#### suspendReads

    public void suspendReads()

Specified by:
  `suspendReads` in interface `org.xnio.conduits.SourceConduit`
Overrides:
  `suspendReads` in class `org.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`