| Modifier and Type | Class and Description |
|---|---|
| private class | WsFrameBase.
For use by the client implementation that needs to obtain payload data without the need for unmasking. |
| protected static enum | WsFrameBase.
WAITING - not suspended
Server case: waiting for a notification that data is ready to be read from the socket, the
socket is registered to the poller
Client case: data has been read from the socket and is waiting for data to be processed
PROCESSING - not suspended
Server case: reading from the socket and processing the data
Client case: processing the data if such has already been read and more data will be read
from the socket
SUSPENDING_WAIT - suspended, a call to suspend() was made while in WAITING state.
|
| private static enum | |
| private abstract static class | |
| private class | WsFrameBase.
For use by the server implementation that needs to obtain payload data and unmask it before any further processing. |
| Modifier and Type | Field and Description |
|---|---|
| private MessageHandler | |
| private boolean | |
| private final ByteBuffer | |
| private final CharBuffer | |
| private boolean | |
| protected final ByteBuffer | |
| private final byte[] | |
| private int | |
| private ByteBuffer | |
| private CharBuffer | |
| private byte | |
| private volatile boolean | |
| private long | |
| private volatile long | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile WsFrameBase. | |
| private int | |
| private static final StringManager | |
| private volatile WsFrameBase. | |
| private boolean | |
| private MessageHandler | |
| private final Transformation | |
| private final CharsetDecoder | |
| private final CharsetDecoder | |
| protected final WsSession |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected static long | |
| protected void | |
| protected boolean | |
| private void | |
| private void | |
| protected abstract Log | |
| protected WsFrameBase. | |
| protected Transformation | |
| private void | |
| protected abstract boolean | |
| protected boolean | |
| protected boolean | |
| private void | |
| private void | |
| private void | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | Returns: true if sufficient data was present to process all of the initial header
|
| protected void | |
| private boolean | Returns: true if sufficient data was present to complete the processing of the header
|
| public void | |
| protected abstract void | |
| protected void | |
| protected void | |
| public void | |
| private boolean | |
| protected void | |
| private boolean |
| binaryMsgHandler | back to summary |
|---|---|
| private MessageHandler binaryMsgHandler | |
| continuationExpected | back to summary |
|---|---|
| private boolean continuationExpected | |
| controlBufferBinary | back to summary |
|---|---|
| private final ByteBuffer controlBufferBinary | |
| controlBufferText | back to summary |
|---|---|
| private final CharBuffer controlBufferText | |
| fin | back to summary |
|---|---|
| private boolean fin | |
| inputBuffer | back to summary |
|---|---|
| protected final ByteBuffer inputBuffer | |
| mask | back to summary |
|---|---|
| private final byte[] mask | |
| maskIndex | back to summary |
|---|---|
| private int maskIndex | |
| messageBufferBinary | back to summary |
|---|---|
| private ByteBuffer messageBufferBinary | |
| messageBufferText | back to summary |
|---|---|
| private CharBuffer messageBufferText | |
| opCode | back to summary |
|---|---|
| private byte opCode | |
| open | back to summary |
|---|---|
| private volatile boolean open | |
| payloadLength | back to summary |
|---|---|
| private long payloadLength | |
| payloadWritten | back to summary |
|---|---|
| private volatile long payloadWritten | |
| READ_STATE_UPDATER | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<WsFrameBase, WsFrameBase. | |
| readState | back to summary |
|---|---|
| private volatile WsFrameBase. | |
| rsv | back to summary |
|---|---|
| private int rsv | |
| sm | back to summary |
|---|---|
| private static final StringManager sm | |
| state | back to summary |
|---|---|
| private volatile WsFrameBase. | |
| textMessage | back to summary |
|---|---|
| private boolean textMessage | |
| textMsgHandler | back to summary |
|---|---|
| private MessageHandler textMsgHandler | |
| transformation | back to summary |
|---|---|
| private final Transformation transformation | |
| utf8DecoderControl | back to summary |
|---|---|
| private final CharsetDecoder utf8DecoderControl | |
| utf8DecoderMessage | back to summary |
|---|---|
| private final CharsetDecoder utf8DecoderMessage | |
| wsSession | back to summary |
|---|---|
| protected final WsSession wsSession | |
| WsFrameBase | back to summary |
|---|---|
| public WsFrameBase(WsSession wsSession, Transformation transformation) | |
| byteArrayToLong | back to summary |
|---|---|
| protected static long byteArrayToLong(byte[] b, int start, int len) throws IOException | |
| changeReadState | back to summary |
|---|---|
| protected void changeReadState(WsFrameBase. | |
| changeReadState | back to summary |
|---|---|
| protected boolean changeReadState(WsFrameBase. | |
| checkRoomHeaders | back to summary |
|---|---|
| private void checkRoomHeaders() | |
| checkRoomPayload | back to summary |
|---|---|
| private void checkRoomPayload() | |
| getLog | back to summary |
|---|---|
| protected abstract Log getLog() | |
| getReadState | back to summary |
|---|---|
| protected WsFrameBase. | |
| getTransformation | back to summary |
|---|---|
| protected Transformation getTransformation() | |
| handleThrowableOnSend | back to summary |
|---|---|
| private void handleThrowableOnSend(Throwable t) throws WsIOException | |
| isMasked | back to summary |
|---|---|
| protected abstract boolean isMasked() | |
| isOpen | back to summary |
|---|---|
| protected boolean isOpen() | |
| isSuspended | back to summary |
|---|---|
| protected boolean isSuspended() | |
| makeRoom | back to summary |
|---|---|
| private void makeRoom() | |
| newFrame | back to summary |
|---|---|
| private void newFrame() | |
| newMessage | back to summary |
|---|---|
| private void newMessage() | |
| processData | back to summary |
|---|---|
| private boolean processData() throws IOException | |
| processDataBinary | back to summary |
|---|---|
| private boolean processDataBinary() throws IOException | |
| processDataControl | back to summary |
|---|---|
| private boolean processDataControl() throws IOException | |
| processDataText | back to summary |
|---|---|
| private boolean processDataText() throws IOException | |
| processInitialHeader | back to summary |
|---|---|
private boolean processInitialHeader() throws IOException
| |
| processInputBuffer | back to summary |
|---|---|
| protected void processInputBuffer() throws IOException | |
| processRemainingHeader | back to summary |
|---|---|
private boolean processRemainingHeader() throws IOException
| |
| resume | back to summary |
|---|---|
| public void resume() | |
| resumeProcessing | back to summary |
|---|---|
| protected abstract void resumeProcessing() This method will be invoked when the read operation is resumed. As the suspend of the read operation can be invoked at any time, when implementing this method one should consider that there might still be data remaining into the internal buffers that needs to be processed before reading again from the socket. | |
| sendMessageBinary | back to summary |
|---|---|
protected void sendMessageBinary(ByteBuffer msg, boolean last) throws WsIOException
| |
| sendMessageText | back to summary |
|---|---|
protected void sendMessageText(boolean last) throws WsIOException
| |
| suspend | back to summary |
|---|---|
| public void suspend() | |
| swallowInput | back to summary |
|---|---|
| private boolean swallowInput() | |
| updateStats | back to summary |
|---|---|
| protected void updateStats(long payloadLength) Hook for updating server side statistics. Called on every frame received.
| |
| usePartial | back to summary |
|---|---|
| private boolean usePartial() | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TransformationResult | getMoreData(byte
The opcode for the frame currently being processed opCode, boolean Is this the final frame in this WebSocket message? fin, int The reserved bits for the frame currently being processed rsv, ByteBuffer The buffer in which the data is to be written dest)Implements org. Obtain more input data. |
| public List | sendMessagePart(List<MessagePart>
The list of messages to be transformed messageParts)Implements org. Takes the provided list of messages, transforms them, passes the transformed list on to the next transformation (if any) and then returns the resulting list of message parts after all of the transformations have been applied. |
| NoopTransformation | back to summary |
|---|---|
| private NoopTransformation() | |
| getMoreData | back to summary |
|---|---|
| public TransformationResult getMoreData(byte opCode, boolean fin, int rsv, ByteBuffer dest) Implements org. Doc from org. Obtain more input data.
| |
| sendMessagePart | back to summary |
|---|---|
| public List Implements org. Doc from org. Takes the provided list of messages, transforms them, passes the transformed list on to the next transformation (if any) and then returns the resulting list of message parts after all of the transformations have been applied.
| |
WAITING - not suspended
Server case: waiting for a notification that data is ready to be read from the socket, the
socket is registered to the poller
Client case: data has been read from the socket and is waiting for data to be processed
PROCESSING - not suspended
Server case: reading from the socket and processing the data
Client case: processing the data if such has already been read and more data will be read
from the socket
SUSPENDING_WAIT - suspended, a call to suspend() was made while in WAITING state. A call to resume() will do
nothing and will transition to WAITING state
SUSPENDING_PROCESS - suspended, a call to suspend() was made while in PROCESSING state. A call to resume() will
do nothing and will transition to PROCESSING state
SUSPENDED - suspended
Server case: processing data finished (SUSPENDING_PROCESS) / a notification was received
that data is ready to be read from the socket (SUSPENDING_WAIT), socket is not
registered to the poller
Client case: processing data finished (SUSPENDING_PROCESS) / data has been read from the
socket and is available for processing (SUSPENDING_WAIT)
A call to resume() will:
Server case: register the socket to the poller
Client case: resume data processing
CLOSING - not suspended, a close will be sent
resume data to be resume
no action processed no action
|---------------| |---------------| |----------|
| v | v v |
| |----------WAITING«--------PROCESSING----| |
| | ^ processing | |
| | | finished | |
| | | | |
| suspend | suspend |
| | | | |
| | resume | |
| | register socket to poller (server) | |
| | resume data processing (client) | |
| | | | |
| v | v |
SUSPENDING_WAIT | SUSPENDING_PROCESS
| | |
| data available | processing finished |
|-------------»SUSPENDED«----------------------|
| Modifier and Type | Field and Description |
|---|---|
| public static final WsFrameBase. | |
| private final boolean | |
| public static final WsFrameBase. | |
| public static final WsFrameBase. | |
| public static final WsFrameBase. | |
| public static final WsFrameBase. | |
| public static final WsFrameBase. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public static WsFrameBase. | |
| public static WsFrameBase. |
| CLOSING | back to summary |
|---|---|
| public static final WsFrameBase. | |
| isSuspended | back to summary |
|---|---|
| private final boolean isSuspended | |
| PROCESSING | back to summary |
|---|---|
| public static final WsFrameBase. | |
| SUSPENDED | back to summary |
|---|---|
| public static final WsFrameBase. | |
| SUSPENDING_PROCESS | back to summary |
|---|---|
| public static final WsFrameBase. | |
| SUSPENDING_WAIT | back to summary |
|---|---|
| public static final WsFrameBase. | |
| WAITING | back to summary |
|---|---|
| public static final WsFrameBase. | |
| ReadState | back to summary |
|---|---|
| private ReadState(boolean isSuspended) | |
| isSuspended | back to summary |
|---|---|
| public boolean isSuspended() | |
| valueOf | back to summary |
|---|---|
| public static WsFrameBase. | |
| values | back to summary |
|---|---|
| public static WsFrameBase. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final WsFrameBase. | |
| public static final WsFrameBase. | |
| public static final WsFrameBase. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static WsFrameBase. | |
| public static WsFrameBase. |
| DATA | back to summary |
|---|---|
| public static final WsFrameBase. | |
| NEW_FRAME | back to summary |
|---|---|
| public static final WsFrameBase. | |
| PARTIAL_HEADER | back to summary |
|---|---|
| public static final WsFrameBase. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static WsFrameBase. | |
| values | back to summary |
|---|---|
| public static WsFrameBase. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements org. Clean-up any resources that were used by the transformation. |
| public Extension | getExtensionResponse()
Implements org. Obtain the extension that describes the information to be returned to the client. |
| public void | setNext(Transformation
The next transformation t)Implements org. Sets the next transformation in the pipeline. |
| public boolean | validateRsv(int
The RSV bits received as an int in the range zero to seven with RSV1 as the MSB and RSV3 as the LSB rsv, byte The opCode received opCode)Implements org. Validates the RSV and opcode combination (assumed to have been extracted from a WebSocket Frame) for this extension. |
| public boolean | validateRsvBits(int
The RSV bits marked as in use so far as an int in the range zero to seven with RSV1 as the MSB and RSV3
as the LSB i)Implements org. Validate that the RSV bit(s) required by this transformation are not being used by another extension. |
| TerminalTransformation | back to summary |
|---|---|
| private TerminalTransformation() | |
| close | back to summary |
|---|---|
| public void close() Implements org. Doc from org. Clean-up any resources that were used by the transformation.
| |
| getExtensionResponse | back to summary |
|---|---|
| public Extension getExtensionResponse() Implements org. Doc from org. Obtain the extension that describes the information to be returned to the client. | |
| setNext | back to summary |
|---|---|
| public void setNext(Transformation t) Implements org. Doc from org. Sets the next transformation in the pipeline.
| |
| validateRsv | back to summary |
|---|---|
| public boolean validateRsv(int rsv, byte opCode) Implements org. Doc from org. Validates the RSV and opcode combination (assumed to have been extracted from a WebSocket Frame) for this extension. The implementation is expected to unset any RSV bits it has validated before passing the remaining RSV bits to the next transformation in the pipeline. Anything other than a value of zero for rsv is invalid.
| |
| validateRsvBits | back to summary |
|---|---|
| public boolean validateRsvBits(int i) Implements org. Doc from org. Validate that the RSV bit(s) required by this transformation are not being used by another extension. The implementation is expected to set any bits it requires before passing the set of in-use bits to the next transformation.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TransformationResult | getMoreData(byte
The opcode for the frame currently being processed opCode, boolean Is this the final frame in this WebSocket message? fin, int The reserved bits for the frame currently being processed rsv, ByteBuffer The buffer in which the data is to be written dest)Implements org. Obtain more input data. |
| public List | sendMessagePart(List<MessagePart>
The list of messages to be transformed messageParts)Implements org. Takes the provided list of messages, transforms them, passes the transformed list on to the next transformation (if any) and then returns the resulting list of message parts after all of the transformations have been applied. |
| UnmaskTransformation | back to summary |
|---|---|
| private UnmaskTransformation() | |
| getMoreData | back to summary |
|---|---|
| public TransformationResult getMoreData(byte opCode, boolean fin, int rsv, ByteBuffer dest) Implements org. Doc from org. Obtain more input data.
| |
| sendMessagePart | back to summary |
|---|---|
| public List Implements org. Doc from org. Takes the provided list of messages, transforms them, passes the transformed list on to the next transformation (if any) and then returns the resulting list of message parts after all of the transformations have been applied.
| |