io.undertow.websockets.core

## Class StreamSinkFrameChannel

- java.lang.Object
- - io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
  - - io.undertow.websockets.core.StreamSinkFrameChannel

All Implemented Interfaces:
  Closeable, AutoCloseable, Channel, GatheringByteChannel, InterruptibleChannel, WritableByteChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, org.xnio.channels.StreamSinkChannel, org.xnio.channels.SuspendableWriteChannel

Direct Known Subclasses:
  WebSocket07FrameSinkChannel

    public abstract class StreamSinkFrameChannel
    extends AbstractFramedStreamSinkChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>

Author:
  Norman Maurer

### Field Summary

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

`EMPTY`

### Constructor Summary

Constructors
`protected` `StreamSinkFrameChannel(WebSocketChannel channel, WebSocketFrameType type)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `areExtensionsSupported()` `true` if extensions are supported for the `WebSocketFrameType`.
`int` `getRsv()` Return the RSV for the extension.
`WebSocketFrameType` `getType()` Return the `WebSocketFrameType` for which the `StreamSinkFrameChannel` was obtained.
`WebSocketChannel` `getWebSocketChannel()`
`boolean` `isFinalFragment()`
`boolean` `isFragmentationSupported()` `true` if fragmentation is supported for the `WebSocketFrameType`.
`protected boolean` `isLastFrame()`
`void` `setRsv(int rsv)` Set the RSV which is used for extensions.

### Methods inherited from class io.undertow.server.protocol.framed.AbstractFramedStreamSinkChannel

`awaitWritable, awaitWritable, channelForciblyClosed, close, createFrameHeader, flush, getAwaitWritableTimeout, getBuffer, getChannel, getCloseSetter, getIoThread, getOption, getWorker, getWriteSetter, getWriteThread, handleFlushComplete, isBroken, isBufferFull, isFinalFrameQueued, isFirstDataWritten, isFlushRequiredOnEmptyBuffer, 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`

### Constructor Detail

#### StreamSinkFrameChannel

    protected StreamSinkFrameChannel(WebSocketChannel channel,
                                     WebSocketFrameType type)

### Method Detail

#### getRsv

    public int getRsv()

Return the RSV for the extension. Default is 0.

#### setRsv

    public void setRsv(int rsv)

Set the RSV which is used for extensions.

This can only be set before any write or transfer operations where passed to the wrapped `StreamSinkChannel`, after that an `IllegalStateException` will be thrown.

#### isFragmentationSupported

    public boolean isFragmentationSupported()

`true` if fragmentation is supported for the `WebSocketFrameType`.

#### areExtensionsSupported

    public boolean areExtensionsSupported()

`true` if extensions are supported for the `WebSocketFrameType`.

#### getType

    public WebSocketFrameType getType()

Return the `WebSocketFrameType` for which the `StreamSinkFrameChannel` was obtained.

#### getWebSocketChannel

    public WebSocketChannel getWebSocketChannel()

#### isLastFrame

    protected boolean isLastFrame()

Specified by:
  `isLastFrame` in class `AbstractFramedStreamSinkChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>`
Returns:
  `true` If this is the last frame that will be sent on this connection

#### isFinalFragment

    public boolean isFinalFragment()