Class WebSocketServerProtocolConfig.Builder
java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketServerProtocolConfig.Builder
- Enclosing class:
WebSocketServerProtocolConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private WebSocketDecoderConfig
private WebSocketDecoderConfig.Builder
private boolean
private long
private boolean
private long
private WebSocketCloseStatus
private String
private String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Builder
(WebSocketServerProtocolConfig serverConfig) private
Builder
(String websocketPath, String subprotocols, boolean checkStartsWith, long handshakeTimeoutMillis, long forceCloseTimeoutMillis, boolean handleCloseFrames, WebSocketCloseStatus sendCloseFrame, boolean dropPongFrames, WebSocketDecoderConfig decoderConfig) -
Method Summary
Modifier and TypeMethodDescriptionallowExtensions
(boolean allowExtensions) allowMaskMismatch
(boolean allowMaskMismatch) build()
Build unmodifiable server protocol configuration.checkStartsWith
(boolean checkStartsWith) true
to handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath()
,false
for exact match (default).closeOnProtocolViolation
(boolean closeOnProtocolViolation) decoderConfig
(WebSocketDecoderConfig decoderConfig) Frames decoder configuration.private WebSocketDecoderConfig.Builder
dropPongFrames
(boolean dropPongFrames) true
if pong frames should not be forwardedexpectMaskedFrames
(boolean expectMaskedFrames) forceCloseTimeoutMillis
(long forceCloseTimeoutMillis) Close the connection if it was not closed by the client after timeout specifiedhandleCloseFrames
(boolean handleCloseFrames) true
if close frames should not be forwarded and just close the channelhandshakeTimeoutMillis
(long handshakeTimeoutMillis) Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT
maxFramePayloadLength
(int maxFramePayloadLength) sendCloseFrame
(WebSocketCloseStatus sendCloseFrame) Close frame to send, when close frame was not send manually.subprotocols
(String subprotocols) CSV of supported protocolswebsocketPath
(String websocketPath) URI path component to handle websocket upgrade requests on.withUTF8Validator
(boolean withUTF8Validator)
-
Field Details
-
websocketPath
-
subprotocols
-
checkStartsWith
private boolean checkStartsWith -
handshakeTimeoutMillis
private long handshakeTimeoutMillis -
forceCloseTimeoutMillis
private long forceCloseTimeoutMillis -
handleCloseFrames
private boolean handleCloseFrames -
sendCloseFrame
-
dropPongFrames
private boolean dropPongFrames -
decoderConfig
-
decoderConfigBuilder
-
-
Constructor Details
-
Builder
-
Builder
private Builder(String websocketPath, String subprotocols, boolean checkStartsWith, long handshakeTimeoutMillis, long forceCloseTimeoutMillis, boolean handleCloseFrames, WebSocketCloseStatus sendCloseFrame, boolean dropPongFrames, WebSocketDecoderConfig decoderConfig)
-
-
Method Details
-
websocketPath
URI path component to handle websocket upgrade requests on. -
subprotocols
CSV of supported protocols -
checkStartsWith
true
to handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath()
,false
for exact match (default). -
handshakeTimeoutMillis
Handshake timeout in mills, when handshake timeout, will trigger user eventWebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT
-
forceCloseTimeoutMillis
Close the connection if it was not closed by the client after timeout specified -
handleCloseFrames
true
if close frames should not be forwarded and just close the channel -
sendCloseFrame
Close frame to send, when close frame was not send manually. Ornull
to disable proper close. -
dropPongFrames
true
if pong frames should not be forwarded -
decoderConfig
Frames decoder configuration. -
decoderConfigBuilder
-
maxFramePayloadLength
-
expectMaskedFrames
-
allowMaskMismatch
-
allowExtensions
-
closeOnProtocolViolation
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation) -
withUTF8Validator
-
build
Build unmodifiable server protocol configuration.
-