io.undertow.conduits

## Class WriteTimeoutStreamSinkConduit

- java.lang.Object
- - org.xnio.conduits.AbstractConduit<D>
  - - org.xnio.conduits.AbstractSinkConduit<D>
    - - org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
      - - io.undertow.conduits.WriteTimeoutStreamSinkConduit

All Implemented Interfaces:
  org.xnio.conduits.Conduit, org.xnio.conduits.SinkConduit, org.xnio.conduits.StreamSinkConduit

    public final class WriteTimeoutStreamSinkConduit
    extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>

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

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

### Field Summary

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

`next`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `awaitWritable()`
`void` `awaitWritable(long time, TimeUnit timeUnit)`
`void` `resumeWrites()`
`void` `suspendWrites()`
`void` `terminateWrites()`
`long` `transferFrom(FileChannel src, long position, long count)`
`long` `transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer)`
`void` `truncateWrites()`
`void` `wakeupWrites()`
`int` `write(ByteBuffer src)`
`long` `write(ByteBuffer[] srcs, int offset, int length)`
`int` `writeFinal(ByteBuffer src)`
`long` `writeFinal(ByteBuffer[] srcs, int offset, int length)`

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

`flush, getWriteThread, isWriteResumed, isWriteShutdown, setWriteReadyHandler`

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

`getWorker`

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

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

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

`flush, getWriteThread, isWriteResumed, isWriteShutdown, setWriteReadyHandler`

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

`getWorker`

### Constructor Detail

#### WriteTimeoutStreamSinkConduit

    public WriteTimeoutStreamSinkConduit(org.xnio.conduits.StreamSinkConduit delegate,
                                         org.xnio.StreamConnection connection,
                                         OpenListener openListener)

### Method Detail

#### write

    public int write(ByteBuffer src)
              throws IOException

Specified by:
  `write` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `write` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### write

    public long write(ByteBuffer[] srcs,
                      int offset,
                      int length)
               throws IOException

Specified by:
  `write` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `write` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### writeFinal

    public int writeFinal(ByteBuffer src)
                   throws IOException

Specified by:
  `writeFinal` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `writeFinal` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### writeFinal

    public long writeFinal(ByteBuffer[] srcs,
                           int offset,
                           int length)
                    throws IOException

Specified by:
  `writeFinal` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `writeFinal` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### transferFrom

    public long transferFrom(FileChannel src,
                             long position,
                             long count)
                      throws IOException

Specified by:
  `transferFrom` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `transferFrom` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### transferFrom

    public long transferFrom(org.xnio.channels.StreamSourceChannel source,
                             long count,
                             ByteBuffer throughBuffer)
                      throws IOException

Specified by:
  `transferFrom` in interface `org.xnio.conduits.StreamSinkConduit`
Overrides:
  `transferFrom` in class `org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### awaitWritable

    public void awaitWritable()
                       throws IOException

Specified by:
  `awaitWritable` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `awaitWritable` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### awaitWritable

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

Specified by:
  `awaitWritable` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `awaitWritable` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### terminateWrites

    public void terminateWrites()
                         throws IOException

Specified by:
  `terminateWrites` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `terminateWrites` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### truncateWrites

    public void truncateWrites()
                        throws IOException

Specified by:
  `truncateWrites` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `truncateWrites` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`
Throws:
  `IOException`

#### resumeWrites

    public void resumeWrites()

Specified by:
  `resumeWrites` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `resumeWrites` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`

#### suspendWrites

    public void suspendWrites()

Specified by:
  `suspendWrites` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `suspendWrites` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`

#### wakeupWrites

    public void wakeupWrites()

Specified by:
  `wakeupWrites` in interface `org.xnio.conduits.SinkConduit`
Overrides:
  `wakeupWrites` in class `org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>`