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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StreamSinkFrameChannel(WebSocketChannel channel, WebSocketFrameType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areExtensionsSupported()
true
if extensions are supported for theWebSocketFrameType
.int
getRsv()
Return the RSV for the extension.WebSocketFrameType
getType()
Return theWebSocketFrameType
for which theStreamSinkFrameChannel
was obtained.WebSocketChannel
getWebSocketChannel()
boolean
isFinalFragment()
boolean
isFragmentationSupported()
true
if fragmentation is supported for theWebSocketFrameType
.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
-
-
-
-
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 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
public WebSocketFrameType getType()
Return theWebSocketFrameType
for which theStreamSinkFrameChannel
was obtained.
-
getWebSocketChannel
public WebSocketChannel 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()
-
-