public static class WebsocketSpec.Builder<SPEC extends WebsocketSpec.Builder<SPEC>> extends Object implements Supplier<SPEC>
Modifier | Constructor and Description |
---|---|
protected |
Builder() |
Modifier and Type | Method and Description |
---|---|
SPEC |
compress(boolean compress)
Sets flag whether the websocket compression extension is enabled
if the client request presents websocket extensions headers.
|
SPEC |
get() |
SPEC |
handlePing(boolean handlePing)
Sets flag whether to proxy websocket ping frames or respond to them.
|
SPEC |
maxFramePayloadLength(int maxFramePayloadLength)
Sets a custom maximum allowable frame payload length.
|
SPEC |
protocols(String protocols)
Sets sub-protocol to use in websocket handshake signature.
|
public final SPEC protocols(String protocols)
protocols
- sub-protocolNullPointerException
- if protocols is nullpublic final SPEC maxFramePayloadLength(int maxFramePayloadLength)
Note: When a websocket compression extension is enabled, this setting is applied on the compressed data.
maxFramePayloadLength
- maximum allowable frame payload lengthIllegalArgumentException
- if maxFramePayloadLength is negativepublic final SPEC handlePing(boolean handlePing)
handlePing
- whether to proxy websocket ping frames or respond to thempublic final SPEC compress(boolean compress)
compress
- whether the websocket compression extension is enabled
if the client request presents websocket extensions headers.