Implementations allow to configure WebSocket parameters.
| Modifier and Type | Method and Description |
|---|---|
| public Duration | Returns: the timeout durationThe duration that a websocket may be idle before being closed by the implementation |
| public int | Returns: the raw network buffer input size.The input (read from network layer) buffer size. |
| public long | Returns: the maximum size of a binary messageGet the maximum size of a binary message during parsing. |
| public long | Returns: the maximum size of a WebSocket Frame.The maximum payload size of any WebSocket Frame which can be received. |
| public int | Returns: the max number of frames.Get the maximum number of data frames allowed to be waiting to be sent at any one time. |
| public long | Returns: the maximum size of a text message.Get the maximum size of a text message during parsing. |
| public int | Returns: the raw network buffer output size.The output (write to network layer) buffer size. |
| public boolean | Returns: whether to automatically fragment incoming WebSocket Frames.If true, frames are automatically fragmented to respect the maximum frame size. |
| public void | setAutoFragment(boolean
whether to automatically fragment incoming WebSocket Frames. autoFragment)If set to true, frames are automatically fragmented to respect the maximum frame size. |
| public void | setIdleTimeout(Duration
the timeout duration (may not be null or negative) duration)The duration that a websocket may be idle before being closed by the implementation |
| public void | |
| public void | setMaxBinaryMessageSize(long
the maximum allowed size of a binary message. size)The maximum size of a binary message during parsing/generating. |
| public void | setMaxFrameSize(long
the maximum allowed size of a WebSocket Frame. maxFrameSize)The maximum payload size of any WebSocket Frame which can be received. |
| public void | setMaxOutgoingFrames(int
the max number of frames. maxOutgoingFrames)Set the maximum number of data frames allowed to be waiting to be sent at any one time. |
| public void | setMaxTextMessageSize(long
the maximum allowed size of a text message. size)The maximum size of a text message during parsing/generating. |
| public void |
| getIdleTimeout | back to summary |
|---|---|
| public Duration getIdleTimeout() The duration that a websocket may be idle before being closed by the implementation
| |
| getInputBufferSize | back to summary |
|---|---|
| public int getInputBufferSize() The input (read from network layer) buffer size. This is the raw read operation buffer size, before the parsing of the websocket frames.
| |
| getMaxBinaryMessageSize | back to summary |
|---|---|
| public long getMaxBinaryMessageSize() Get the maximum size of a binary message during parsing. This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling binary messages. This applies to individual frames, whole message handling, and partial message handling.
Binary messages over this maximum will result in a close code 1009
| |
| getMaxFrameSize | back to summary |
|---|---|
| public long getMaxFrameSize() The maximum payload size of any WebSocket Frame which can be received.
| |
| getMaxOutgoingFrames | back to summary |
|---|---|
| public int getMaxOutgoingFrames() Get the maximum number of data frames allowed to be waiting to be sent at any one time.
The default value is -1, this indicates there is no limit on how many frames can be
queued to be sent by the implementation. If the limit is exceeded, subsequent frames
sent are failed with a
| |
| getMaxTextMessageSize | back to summary |
|---|---|
| public long getMaxTextMessageSize() Get the maximum size of a text message during parsing. This is a memory conservation option, memory over this limit will not be allocated by Jetty for handling text messages. This applies to individual frames, whole message handling, and partial message handling.
Text messages over this maximum will result in a close code 1009
| |
| getOutputBufferSize | back to summary |
|---|---|
| public int getOutputBufferSize() The output (write to network layer) buffer size. This is the raw write operation buffer size and has no relationship to the websocket frame.
| |
| isAutoFragment | back to summary |
|---|---|
| public boolean isAutoFragment() If true, frames are automatically fragmented to respect the maximum frame size.
| |
| setAutoFragment | back to summary |
|---|---|
| public void setAutoFragment(boolean autoFragment) If set to true, frames are automatically fragmented to respect the maximum frame size.
| |
| setIdleTimeout | back to summary |
|---|---|
| public void setIdleTimeout(Duration duration) The duration that a websocket may be idle before being closed by the implementation
| |
| setInputBufferSize | back to summary |
|---|---|
| public void setInputBufferSize(int size) The input (read from network layer) buffer size.
| |
| setMaxBinaryMessageSize | back to summary |
|---|---|
| public void setMaxBinaryMessageSize(long size) The maximum size of a binary message during parsing/generating.
Binary messages over this maximum will result in a close code 1009
| |
| setMaxFrameSize | back to summary |
|---|---|
| public void setMaxFrameSize(long maxFrameSize) The maximum payload size of any WebSocket Frame which can be received.
WebSocket Frames over this maximum will result in a close code 1009
| |
| setMaxOutgoingFrames | back to summary |
|---|---|
| public void setMaxOutgoingFrames(int maxOutgoingFrames) Set the maximum number of data frames allowed to be waiting to be sent at any one time.
The default value is -1, this indicates there is no limit on how many frames can be
queued to be sent by the implementation. If the limit is exceeded, subsequent frames
sent are failed with a
| |
| setMaxTextMessageSize | back to summary |
|---|---|
| public void setMaxTextMessageSize(long size) The maximum size of a text message during parsing/generating.
Text messages over this maximum will result in a close code 1009
| |
| setOutputBufferSize | back to summary |
|---|---|
| public void setOutputBufferSize(int size) The output (write to network layer) buffer size.
| |