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:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.GatheringByteChannel,java.nio.channels.InterruptibleChannel,java.nio.channels.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 protectedStreamSinkFrameChannel(WebSocketChannel channel, WebSocketFrameType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanareExtensionsSupported()trueif extensions are supported for theWebSocketFrameType.intgetRsv()Return the RSV for the extension.WebSocketFrameTypegetType()Return theWebSocketFrameTypefor which theStreamSinkFrameChannelwas obtained.WebSocketChannelgetWebSocketChannel()booleanisFinalFragment()booleanisFragmentationSupported()trueif fragmentation is supported for theWebSocketFrameType.protected booleanisLastFrame()voidsetRsv(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 anIllegalStateExceptionwill be thrown.
-
isFragmentationSupported
public boolean isFragmentationSupported()
trueif fragmentation is supported for theWebSocketFrameType.
-
areExtensionsSupported
public boolean areExtensionsSupported()
trueif extensions are supported for theWebSocketFrameType.
-
getType
public WebSocketFrameType getType()
Return theWebSocketFrameTypefor which theStreamSinkFrameChannelwas obtained.
-
getWebSocketChannel
public WebSocketChannel getWebSocketChannel()
-
isLastFrame
protected boolean isLastFrame()
- Specified by:
isLastFramein classAbstractFramedStreamSinkChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>- Returns:
trueIf this is the last frame that will be sent on this connection
-
isFinalFragment
public boolean isFinalFragment()
-
-