public class WebSocket07Channel extends WebSocketChannel
WebSocketChannel
which is used for WebSocketVersion.V08
WebSocketChannel.PartialFrame
Modifier and Type | Field and Description |
---|---|
protected static byte |
OPCODE_BINARY |
protected static byte |
OPCODE_CLOSE |
protected static byte |
OPCODE_CONT |
protected static byte |
OPCODE_PING |
protected static byte |
OPCODE_PONG |
protected static byte |
OPCODE_TEXT |
extensionFunction, extensionsSupported, fragmentedChannel, hasReservedOpCode
EMPTY
Constructor and Description |
---|
WebSocket07Channel(StreamConnection channel,
ByteBufferPool bufferPool,
String wsUrl,
String subProtocol,
boolean client,
boolean allowExtensions,
ExtensionFunction extensionFunction,
Set<WebSocketChannel> openConnections,
OptionMap options)
Create a new
WebSocket07Channel |
Modifier and Type | Method and Description |
---|---|
protected void |
closeSubChannels()
Method that is called when the channel is being forcibly closed, and all sub stream sink/source
channels should also be forcibly closed.
|
protected StreamSinkFrameChannel |
createStreamSinkChannel(WebSocketFrameType type)
Create a new StreamSinkFrameChannel which can be used to send a WebSocket Frame of the type
WebSocketFrameType . |
protected void |
markReadsBroken(Throwable cause)
Called when a source sub channel fails to fulfil its contract, and leaves the channel in an inconsistent state.
|
protected WebSocketChannel.PartialFrame |
receiveFrame()
Create a new
StreamSourceFrameChannel which can be used to read the data of the received Frame |
areExtensionsSupported, createChannel, createIdleTimeoutChannel, getAttribute, getCloseCode, getCloseReason, getDestinationAddress, getExtensionFunction, getFramePriority, getPeerConnections, getRequestScheme, getSourceAddress, getSubProtocol, getSubProtocols, getUrl, getVersion, handleBrokenSinkChannel, handleBrokenSourceChannel, isClient, isCloseFrameReceived, isCloseFrameSent, isCloseInitiatedByRemotePeer, isLastFrameReceived, isLastFrameSent, isReadsBroken, isSecure, lastDataRead, parseFrame, send, sendClose, setAttribute, setCloseCode, setCloseReason
addCloseTask, close, flush, flushSenders, getBufferPool, getCloseSetter, getIdleTimeout, getIoThread, getLocalAddress, getLocalAddress, getOption, getPeerAddress, getPeerAddress, getReceiveSetter, getSettings, getUnderlyingConnection, getWorker, isOpen, isReceivesResumed, isRequireExplicitFlush, isWritesBroken, markWritesBroken, queueFrame, recalculateHeldFrames, receive, resumeReceives, setIdleTimeout, setOption, setRequireExplicitFlush, supportsOption, suspendReceives, toString, writeExceptionHandler
protected static final byte OPCODE_CONT
protected static final byte OPCODE_TEXT
protected static final byte OPCODE_BINARY
protected static final byte OPCODE_CLOSE
protected static final byte OPCODE_PING
protected static final byte OPCODE_PONG
public WebSocket07Channel(StreamConnection channel, ByteBufferPool bufferPool, String wsUrl, String subProtocol, boolean client, boolean allowExtensions, ExtensionFunction extensionFunction, Set<WebSocketChannel> openConnections, OptionMap options)
WebSocket07Channel
channel
- The StreamConnection
over which the WebSocket Frames should get send and received.
Be aware that it already must be "upgraded".bufferPool
- The ByteBufferPool
which will be used to acquire ByteBuffer
's from.wsUrl
- The url for which the WebSocket07Channel
was created.protected WebSocketChannel.PartialFrame receiveFrame()
WebSocketChannel
StreamSourceFrameChannel
which can be used to read the data of the received FramereceiveFrame
in class WebSocketChannel
StreamSourceFrameChannel
will be used to read a Frame from.
This will return null
if the right StreamSourceFrameChannel
could not be detected with the given
buffer and so more data is needed.protected void markReadsBroken(Throwable cause)
AbstractFramedChannel
The underlying read side will be forcibly closed.
markReadsBroken
in class WebSocketChannel
cause
- The possibly null causeprotected void closeSubChannels()
AbstractFramedChannel
closeSubChannels
in class AbstractFramedChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>
protected StreamSinkFrameChannel createStreamSinkChannel(WebSocketFrameType type)
WebSocketChannel
WebSocketFrameType
.createStreamSinkChannel
in class WebSocketChannel
type
- The WebSocketFrameType
of the WebSocketFrame which will be send over this StreamSinkFrameChannel
Copyright © 2017 JBoss by Red Hat. All rights reserved.