public static final class WebSocketServerProtocolConfig.Builder extends Object
Modifier and Type | Method and Description |
---|---|
WebSocketServerProtocolConfig.Builder |
allowExtensions(boolean allowExtensions) |
WebSocketServerProtocolConfig.Builder |
allowMaskMismatch(boolean allowMaskMismatch) |
WebSocketServerProtocolConfig |
build()
Build unmodifiable server protocol configuration.
|
WebSocketServerProtocolConfig.Builder |
checkStartsWith(boolean checkStartsWith)
true to handle all requests, where URI path component starts from
WebSocketServerProtocolConfig.websocketPath() , false for exact match (default). |
WebSocketServerProtocolConfig.Builder |
closeOnProtocolViolation(boolean closeOnProtocolViolation) |
WebSocketServerProtocolConfig.Builder |
decoderConfig(WebSocketDecoderConfig decoderConfig)
Frames decoder configuration.
|
WebSocketServerProtocolConfig.Builder |
dropPongFrames(boolean dropPongFrames)
true if pong frames should not be forwarded |
WebSocketServerProtocolConfig.Builder |
expectMaskedFrames(boolean expectMaskedFrames) |
WebSocketServerProtocolConfig.Builder |
forceCloseTimeoutMillis(long forceCloseTimeoutMillis)
Close the connection if it was not closed by the client after timeout specified
|
WebSocketServerProtocolConfig.Builder |
handleCloseFrames(boolean handleCloseFrames)
true if close frames should not be forwarded and just close the channel |
WebSocketServerProtocolConfig.Builder |
handshakeTimeoutMillis(long handshakeTimeoutMillis)
Handshake timeout in mills, when handshake timeout, will trigger user
event
WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT |
WebSocketServerProtocolConfig.Builder |
maxFramePayloadLength(int maxFramePayloadLength) |
WebSocketServerProtocolConfig.Builder |
sendCloseFrame(WebSocketCloseStatus sendCloseFrame)
Close frame to send, when close frame was not send manually.
|
WebSocketServerProtocolConfig.Builder |
subprotocols(String subprotocols)
CSV of supported protocols
|
WebSocketServerProtocolConfig.Builder |
websocketPath(String websocketPath)
URI path component to handle websocket upgrade requests on.
|
WebSocketServerProtocolConfig.Builder |
withUTF8Validator(boolean withUTF8Validator) |
public WebSocketServerProtocolConfig.Builder websocketPath(String websocketPath)
public WebSocketServerProtocolConfig.Builder subprotocols(String subprotocols)
public WebSocketServerProtocolConfig.Builder checkStartsWith(boolean checkStartsWith)
true
to handle all requests, where URI path component starts from
WebSocketServerProtocolConfig.websocketPath()
, false
for exact match (default).public WebSocketServerProtocolConfig.Builder handshakeTimeoutMillis(long handshakeTimeoutMillis)
WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_TIMEOUT
public WebSocketServerProtocolConfig.Builder forceCloseTimeoutMillis(long forceCloseTimeoutMillis)
public WebSocketServerProtocolConfig.Builder handleCloseFrames(boolean handleCloseFrames)
true
if close frames should not be forwarded and just close the channelpublic WebSocketServerProtocolConfig.Builder sendCloseFrame(WebSocketCloseStatus sendCloseFrame)
null
to disable proper close.public WebSocketServerProtocolConfig.Builder dropPongFrames(boolean dropPongFrames)
true
if pong frames should not be forwardedpublic WebSocketServerProtocolConfig.Builder decoderConfig(WebSocketDecoderConfig decoderConfig)
public WebSocketServerProtocolConfig.Builder maxFramePayloadLength(int maxFramePayloadLength)
public WebSocketServerProtocolConfig.Builder expectMaskedFrames(boolean expectMaskedFrames)
public WebSocketServerProtocolConfig.Builder allowMaskMismatch(boolean allowMaskMismatch)
public WebSocketServerProtocolConfig.Builder allowExtensions(boolean allowExtensions)
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation)
public WebSocketServerProtocolConfig.Builder withUTF8Validator(boolean withUTF8Validator)
public WebSocketServerProtocolConfig build()
Copyright © 2008–2024 The Netty Project. All rights reserved.