Module io.netty5.codec.http
Class WebSocketServerProtocolConfig.Builder
- java.lang.Object
-
- io.netty5.handler.codec.http.websocketx.WebSocketServerProtocolConfig.Builder
-
- Enclosing class:
- WebSocketServerProtocolConfig
public static final class WebSocketServerProtocolConfig.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 fromWebSocketServerProtocolConfig.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 forwardedWebSocketServerProtocolConfig.Builder
expectMaskedFrames(boolean expectMaskedFrames)
WebSocketServerProtocolConfig.Builder
forceCloseTimeoutMillis(long forceCloseTimeoutMillis)
Close the connection if it was not closed by the client after timeout specifiedWebSocketServerProtocolConfig.Builder
handleCloseFrames(boolean handleCloseFrames)
true
if close frames should not be forwarded and just close the channelWebSocketServerProtocolConfig.Builder
handshakeTimeoutMillis(long handshakeTimeoutMillis)
Handshake timeout in millis, when handshake timeout, will trigger an inbound channel eventWebSocketHandshakeCompletionEvent
with aWebSocketHandshakeException
.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 protocolsWebSocketServerProtocolConfig.Builder
websocketPath(String websocketPath)
URI path component to handle websocket upgrade requests on.WebSocketServerProtocolConfig.Builder
withUTF8Validator(boolean withUTF8Validator)
-
-
-
Method Detail
-
websocketPath
public WebSocketServerProtocolConfig.Builder websocketPath(String websocketPath)
URI path component to handle websocket upgrade requests on.
-
subprotocols
public WebSocketServerProtocolConfig.Builder subprotocols(String subprotocols)
CSV of supported protocols
-
checkStartsWith
public WebSocketServerProtocolConfig.Builder checkStartsWith(boolean checkStartsWith)
true
to handle all requests, where URI path component starts fromWebSocketServerProtocolConfig.websocketPath()
,false
for exact match (default).
-
handshakeTimeoutMillis
public WebSocketServerProtocolConfig.Builder handshakeTimeoutMillis(long handshakeTimeoutMillis)
Handshake timeout in millis, when handshake timeout, will trigger an inbound channel eventWebSocketHandshakeCompletionEvent
with aWebSocketHandshakeException
.
-
forceCloseTimeoutMillis
public WebSocketServerProtocolConfig.Builder forceCloseTimeoutMillis(long forceCloseTimeoutMillis)
Close the connection if it was not closed by the client after timeout specified
-
handleCloseFrames
public WebSocketServerProtocolConfig.Builder handleCloseFrames(boolean handleCloseFrames)
true
if close frames should not be forwarded and just close the channel
-
sendCloseFrame
public WebSocketServerProtocolConfig.Builder sendCloseFrame(WebSocketCloseStatus sendCloseFrame)
Close frame to send, when close frame was not send manually. Ornull
to disable proper close.
-
dropPongFrames
public WebSocketServerProtocolConfig.Builder dropPongFrames(boolean dropPongFrames)
true
if pong frames should not be forwarded
-
decoderConfig
public WebSocketServerProtocolConfig.Builder decoderConfig(WebSocketDecoderConfig decoderConfig)
Frames decoder configuration.
-
maxFramePayloadLength
public WebSocketServerProtocolConfig.Builder maxFramePayloadLength(int maxFramePayloadLength)
-
expectMaskedFrames
public WebSocketServerProtocolConfig.Builder expectMaskedFrames(boolean expectMaskedFrames)
-
allowMaskMismatch
public WebSocketServerProtocolConfig.Builder allowMaskMismatch(boolean allowMaskMismatch)
-
allowExtensions
public WebSocketServerProtocolConfig.Builder allowExtensions(boolean allowExtensions)
-
closeOnProtocolViolation
public WebSocketServerProtocolConfig.Builder closeOnProtocolViolation(boolean closeOnProtocolViolation)
-
withUTF8Validator
public WebSocketServerProtocolConfig.Builder withUTF8Validator(boolean withUTF8Validator)
-
build
public WebSocketServerProtocolConfig build()
Build unmodifiable server protocol configuration.
-
-