Package 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
ConstructorsModifierConstructorDescriptionprotected
StreamSinkFrameChannel
(WebSocketChannel channel, WebSocketFrameType type) -
Method Summary
Modifier and TypeMethodDescriptionboolean
true
if extensions are supported for theWebSocketFrameType
.int
getRsv()
Return the RSV for the extension.getType()
Return theWebSocketFrameType
for which theStreamSinkFrameChannel
was obtained.boolean
boolean
true
if fragmentation is supported for theWebSocketFrameType
.protected boolean
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
-
Constructor Details
-
StreamSinkFrameChannel
-
-
Method Details
-
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 anIllegalStateException
will be thrown. -
isFragmentationSupported
public boolean isFragmentationSupported()true
if fragmentation is supported for theWebSocketFrameType
. -
areExtensionsSupported
public boolean areExtensionsSupported()true
if extensions are supported for theWebSocketFrameType
. -
getType
Return theWebSocketFrameType
for which theStreamSinkFrameChannel
was obtained. -
getWebSocketChannel
-
isLastFrame
protected boolean isLastFrame()- Specified by:
isLastFrame
in classAbstractFramedStreamSinkChannel<WebSocketChannel,
StreamSourceFrameChannel, StreamSinkFrameChannel> - Returns:
true
If this is the last frame that will be sent on this connection
-
isFinalFragment
public boolean isFinalFragment()
-